Is it possible to search using a saved search query (created by advanced search in the Content Server UI) through Search Service. If we can do it, can you please let me know tht API details.
Thanks,
Vasantha
Hello Vasantha,
This was recently discussed here on the KC:
https://knowledge.opentext.com/knowledge/cs.dll?func=ll&objId=21554113&objAction=viewincontainer
Please have a look at that thread.
Cheers,
Kyle
Thanks Kyle for the information.
So the conclusion would be , using the SearchService we can search using the search template but there is no API available for searching with a saved query object.
Will give a try using the template id.
I have explored the "templateID" option for searching, the snippet of code looks as below :
SingleSearchRequest singleSearchRequest = new SingleSearchRequest(); singleSearchRequest.setFirstResultToRetrieve(1); singleSearchRequest.setNumResultsToRetrieve(100); singleSearchRequest.setQueryLanguage("Livelink Search API V1"); singleSearchRequest.setResultOrderSpec( "sortByRegion=OTName& sortDirection=ascending" ); singleSearchRequest.setResultSetSpec("where1=*&templateId=22565");
I have used this SingleSearchRequest object in search method of a SearchService. The template id that is used is existing in the system(http://<host>:port/<urlprefix>/livelink.exe?func=search.getTemplates)
But getting the below error while using the API of SearchService: javax.xml.ws.soap.SOAPFaultException: Set Specification Syntax Failure. You are not allowed to use 'templateID'
I have used the same template id in the url of the Content Server UI, and am able to see the results(http://<host:port>/<urlprefix>/livelink.exe?func=search&templateID=22565
Please help me in using the template id API for Search service.
I am having the same issue. There does not seem to be a way to search using saved searches or templates with the WS Search API. This severely limits the usefulness of this API. For example, without using a search template, I don't see any way to limit search to a subset of folders in Content Server.
So, if you wanted to search for anything stored in the folder with DataID 1234, you could use the query "OTLocation":1234. Regards, Kyle