Search to bring back maps that have been modified in last week

Need to verify if this is the query to bring back maps that have been modified in last 7 days.

I have tried the following without any results and I know I have modified maps within the last 7 days.

Here are two different query statements I have tried passing into the performSearch method..

  • <ishquery><and><ishfield name="FISHLASTMODIFIEDON" level="lng" ishoperator="greaterthanorequal">18/10/2015</ishfield></and><ishobjectfilters><ishtypefilter>ISHMasterDoc</ishtypefilter></ishobjectfilters></ishquery

  • <ishquery><and><ishfield name="MODIFIED-ON" level="logical" ishoperator="greaterthanorequal">18/10/2015</ishfield></and><ishobjectfilters><ishtypefilter>ISHMasterDoc</ishtypefilter></ishobjectfilters></ishquery>

If I substiture ISHModule for ISHMasterDoc it does bring back topics.

Any suggestions?

Parents
  • Hi Patrick,

    I assume you are on 2013SP1/10.0.1. Can you verify (and potentially provide) the content of the "InfoShareWS" server log file?

    Without verifying all details, I think your <ishquery> is missing elements and probably returns an error to your code base. Have a look at https://docs.sdl.com/LiveContent/content/en-US/SDL%20LiveContent%20full%20documentation-v143/GUID-047CE63F-76C2-4A34-A33E-489DEE2BF51C where the example holds <ishsort>, <ishversionfilter>, <ishlanguagefilter>,...

    I would also advise to use DocumentObj25.Find instead of Search25.PerformSearch unless you have specific reasons of course, see lower.


    Some background...
    The field FISHLASTMODIFIEDON is typically tied to the language (lng) level and only gets an update if a blob (xml, image,...) was successfully uploaded. The field MODIFIED-ON is available on the logical, version and language (lng) level and gets an update for any successfull metadata or blob change.
    You lower query (MODIFIED-ON on logical level) will most likely not return results as you are querying changes on a level far away from the language (lng) level. So the simplest change can be to change level="logical" to level="lng".

    The Search25.PerformSearch API (https://docs.sdl.com/LiveContent/content/en-US/SDL%20LiveContent%20full%20documentation-v143/GUID-E9347C85-40E3-453F-95D5-DFA560287CDD) relies on the full-text-index collection which is a slave repository to the database if you will. Our "Crawler" service continuously matches database updates to the full-text-index one.

    The DocumentObj25.Find API (https://docs.sdl.com/LiveContent/content/en-US/SDL%20LiveContent%20full%20documentation-v143/GUID-B879F67C-211B-4B23-9A00-CE8823915D96) will execute the query using SQL on the database giving you the most accurate response possible and removes the dependency on the full-text-index collection.
Reply
  • Hi Patrick,

    I assume you are on 2013SP1/10.0.1. Can you verify (and potentially provide) the content of the "InfoShareWS" server log file?

    Without verifying all details, I think your <ishquery> is missing elements and probably returns an error to your code base. Have a look at https://docs.sdl.com/LiveContent/content/en-US/SDL%20LiveContent%20full%20documentation-v143/GUID-047CE63F-76C2-4A34-A33E-489DEE2BF51C where the example holds <ishsort>, <ishversionfilter>, <ishlanguagefilter>,...

    I would also advise to use DocumentObj25.Find instead of Search25.PerformSearch unless you have specific reasons of course, see lower.


    Some background...
    The field FISHLASTMODIFIEDON is typically tied to the language (lng) level and only gets an update if a blob (xml, image,...) was successfully uploaded. The field MODIFIED-ON is available on the logical, version and language (lng) level and gets an update for any successfull metadata or blob change.
    You lower query (MODIFIED-ON on logical level) will most likely not return results as you are querying changes on a level far away from the language (lng) level. So the simplest change can be to change level="logical" to level="lng".

    The Search25.PerformSearch API (https://docs.sdl.com/LiveContent/content/en-US/SDL%20LiveContent%20full%20documentation-v143/GUID-E9347C85-40E3-453F-95D5-DFA560287CDD) relies on the full-text-index collection which is a slave repository to the database if you will. Our "Crawler" service continuously matches database updates to the full-text-index one.

    The DocumentObj25.Find API (https://docs.sdl.com/LiveContent/content/en-US/SDL%20LiveContent%20full%20documentation-v143/GUID-B879F67C-211B-4B23-9A00-CE8823915D96) will execute the query using SQL on the database giving you the most accurate response possible and removes the dependency on the full-text-index collection.
Children