Hi all!
I got a problem..
Someone know about this:
Instead of obtain OTDataID, is it possible obtain a Node object with SearchService?
Bless and Regards!
I don’t seem to recall the SearchService returning the node object itself, just the DataIDs.
If you trying to retrieve the node object information for a given OTDataID, you could use the DocMan service to retrieve the node information after the search is executed.
Obtain a Node Posted byMolinares, Roldan Ortiz OrtizOn 11/04/2015 04:32 PM Hi all!I got a problem..Someone know about this:Instead of obtain OTDataID, is it possible obtain a Node object with SearchService? Bless and Regards![To post a comment, use the normal reply function]Forum:Content Web Services ForumContent Server:Knowledge Center
Thx guys for the reply but i do not want to find only 1 document...
You let me explain
I'm using the SearchService for find documents with a criteria ... And i have recived 100 documents for example.
So... This is the problem:
[....]
SResultPage resultados = resp.getResults(); //f.ex: i have obtained 100 documents and it's fast
for (int i = 0; i < resultados.getItem().size(); i++) {
//Per each document
//1. Obtain the idObject of document
String idObject = resultados.getItem().get(i).getID().replace("DataId=", ""); idObject = idObject.substring(0, idObject.indexOf("&"));
//2. Use getNode(idObject) method of DocumentManagementService
Node document = documentManagement.getNode(new Integer(idObject));
[.....]
}
The SearchService is fast but is very slow the getNode process per each idObject.
Therefore i'm looking for is it possible obtain the document node from SearchService?
Or if this is not possible... How can do it to optimize time in this operation?
Thx, bless and Regards!
Hi Roland,
We need to understand what your intent is when you get the node information. Are you only attempting to retrieve the metadata only or are you manipulating the node?
As Pramod stated, if the intent is to retireve the metadata information, then you can use search to retrieve that information. However, it if it to make modifications to the node itself, then your only option is to use the GetNode method.
Most of time, performance is always based on the environment that you are working with. However, if you can clarify your intent, then maybe the community can answer your question.
Regards,
Jerome
Perhaps I do not understand your use case. What would you be using these dataid’s returned? Because the Node is only needed if you need to manipulate it.
Usually when you use search you will paint a page with hyperlinks to the object so you really need almost nothing else .If the company has SSO then the links will give the user all the
Capabilities .My question to you is if the search returned 200000 results and if the customer wanted to say update category info on 2 of the nodes
One would only do node translations on the 2 of them .So treat your search result dataid’s as the nodehandle for subsequent operations and design your program for that.
Or another use case I want to download all the documents given to me from a search in a page where I allow a select all or select 1 or 2.Then only after the selection would
You get the real node.
From: eLink Entry: Content Web Services Forum [mailto:otdncontentwebservices971forum@elinkkc.opentext.com]Sent: Thursday, November 05, 2015 9:18 AMTo: eLink Recipient <devnull@elinkkc.opentext.com>Subject: [EXTERNAL]Re Obtain a Node
Re Obtain a Node
Posted by Molinares, Roldan Ortiz Ortiz On 11/05/2015 10:13 AM
Quoted eLink on 11/05/2015 10:13 AM:
[To post a comment, use the normal reply function]
Topic:
Obtain a Node
Forum:
Content Web Services Forum
Content Server:
Knowledge Center
You may be interested in the getNodes() method of the DocumentManagement service.
You can pass in an array of DataIDs instead of having to make individual getNode() calls.
Hey thx for all replies!
Supposed that I have 100 documents in the CS.Those documents have a category named "Z" and this category have this metadata:MetadataAMetadataBMetadataCMetadataDMetadataEMetadataF
=======
I have the following problem:
1. I need make a web service method that find all documents that have in his category "Z" with this values:MetadataA = '1'MetadataB = '2'MetadataC = '3'
2. Next, this method should returned the values of MetadataD, MetadataE and MetadataF.
The first part i could obtain it with a SearchService... and in the second part I have used the getNode method and getNodes method to obtain per each node object the MetadataD, MetadataE and MetadataF values. The problem is that this method is slower like a turtle hehehe
Somebody know if is it possible optimize it?
Let me know if somebody know how shall it be done
Thx 4 advance, bless and regards!
hi!
Somebody know about this?
thx, bless and regards
Hi Roldan,
If you just need to retrieve the metadata then you may want to consider using the search XML API instead of the search webservice. More info here: https://knowledge.opentext.com/knowledge/llisapi.dll/Open/16579994
You can make it return whatever regions you like based on whatever criteria you like, so long as the region is set to "Displayable" in the search manager. Just becomes a matter of ingesting the XML output and parsing accordingly.
Cheers,
AK
I don't believe it is possible to get the metadata (categories on a node) without first getting the node, which you are already doing in the first part. To get the metadata on the node, it is my understanding that you need the node anyway, so you're incurring the cost regardless.
Hey thx for replies!
But i have seen that it's not possible...
With the SearService only i can get this:
Search ResultsThe standard XML output always includes the search results that the active user haspermission to see. The search results information for each item includes thefollowing:5.1.3• The score that the item was given when it was ranked by relevance• The item's MIME type• The item's name• A hyperlink that opens the item• The date on which the item was last modified• The item's location in Content Server• The date on which the item was created• The size of the item• A list of values in the Search Filters panel, showing a number for the metadataand a count which indicates how frequently that value shows up in the results.
Well, i have decided to use the setFirstResultToRetrieve method and setNumResultsToRetrieve method to control my output (25 items) ... i go to making a pagination.
Thx 4 all!
Bless and regards!