Search topics for last released version

Trying to search using the UI or the API to return the last released version for all topics. If I set the search criteria to version="latest" and status="Released", then all topics with the latest version no in Released don't show up in search results. If the criteria is changed to version="all versions" then the search results has duplicates, for topics with more than one released version. What would be the best way to accomplish my query.

Thanks in advance for any suggestions/solution.

  • Hi Akheil,

    Assuming that your FullTextIndex is up-to-date, maintained by the Crawler Windows service... then

    • Collection "LatestVersion" will hold the latest version of any logical object, no matter its status (FSTATUS). The purpose of this collection is to give fast results upon query (as LatestVersion is the smaller collection by definition), and mostly the latest version of an object contains more-or-less the same content as earlier versions.
    • Collection "AllVersions" contains all versions of a logical object, including all statusses. So it will potentially give multiple versions as hits within every logical object depending on your search criteria.

    I think you might be interested by Understanding status filters - SDL Documentation (rws.com), we have a system metadata field FISHSTATUSTYPE that we try to maintain behind the scenes to support our tools and logic. Due to timing, you might still gets duplicate hits and might have to do conflict resolving, but it will be quite a lot cleaner result set.

    You could add this FISHSTATUSTYPE system field to your search screens, although somewhat technical for your end users.
    Or you can use it in postprocessing DocumentObj API calls, or directly in Search API calls. For others, my usual hint to ISHRemote goes here: https://github.com/RWS/ISHRemote/blob/master/Doc/ReleaseNotes-ISHRemote-0.13.md#searching-the-repository :)

    -Dave