Documents fetch and search issue using XML Search API(Content server 20.4)

Hi Experts,

We are having below issues while performing full text search

using XML search API.

Can you please help us in this.

  • Getting permission related error while clicking on documents hyperlink after searching it through XML Search API and using func=doc.fetch in the URL.

http://<server_name>/otcs/cs.exe/<xxxxx>/<filename>?func=doc.fetch&nodeid=<xxxxx>

  • Search result changes intermittently while performing XML Search using below URL. We are trying to search for a word "test" under one particular folder. But the search result has documents and folders from other folder as well even after specifying particular folder node ID in search URL.

http://<server_name>otcs/cs.exe?func=search&objId=<xxxx(folder to be searched)>&where1=<test>&outputformat=xml



Regards,

Shamli

Tagged:

Comments

  • @shamli You've not provided any detail on what you are doing with the XML Search Results to transform them for the user, so I am guessing as to whats happening.

    I am not sure why you have a long URL "http://<server_name>/otcs/cs.exe/<xxxxx>/<filename>?func=doc.fetch&nodeid=<xxxxx>" for fetch, you can just use :

    http://<server_name>/otcs/cs.exe?func=doc.fetch&nodeid=<xxxxx>

    Can you provide the details of the "error" you are seeing, the logs may also give you a suggestion as to the root cause.

    For your second question the OBJID is not the correct parameter to use for filtering content under a single container, you need to use the LOCATION property in the search query - on another way to identify the records such as metadata/classifications etc.

  • @Greg Griffiths

    Thanks for the reply.

    Second query is resolved after replacing OBJID with Location_ID1.

    I have attached error screenshot for first query. We are trying with user who has admin privilege.


    Regards,

    Shamli


  • thats a permission issue, the user does not have access to the object, you will need to review your permission model to ensure that they do have access if appropriate.

  • @Greg_Ackerson

    Getting same error when I tried with my ID with system administration rights.

    Please let me know whether eDiscovery rights need to be provided.


    Regards,

    Shamli

  • @Greg Griffiths

    Getting same error when I tried with my ID with system administration rights.

    Please let me know whether eDiscovery rights need to be provided.


    Regards,

    Shamli

  • check in the database to see if the node exists in the usual tables, if not then you will need to work out why its appearing in the results - could be that its been deleted but the index has not caught up etc.

  • @Greg Griffiths

    We have modified the code with this function "objAction=download" instead of using doc.fetch to display the documents in order to mitigate this permission issue. Its working as expected when we run the code locally.

    And when we deploy this code in web server and try to do full text search, we are getting authentication error. 

    Attached code for your reference. Can you please help me to find the root cause.


  • check if you are passing the right user credentials.