Search.PerformSearch in Knowledge Center 12

I am using the API documentation for Tridion docs 13, but I am using Knowledge Center 12. About Search.PerformSearch, it says that results are no longer cached and the caller has to manage retrieving results in chunks. I'm guessing that what I am seeing is the old behavior.

If I request 0 hits, it returns the number of hits, without the results. But, if I request 1000, it returns the first 1000, over and over, rather than retrieving the next chunk.

If I request all of the hits, it returns them all in that call, e.g. PerformSearch(query, 3214, out result), returns 3214 hits.

How can I retrieve results in chunks? Or, can I? 

 

Parents Reply
  • Hi Kendall,

    Unfortunately the statement ‘Requesting more hits’ means that you rerun your existing query with the max hits to return parameter set to a higher number.

    So this will return the higher number of hits and you only need to visualize the hits from your previous threshold onwards. So in the samples provided above it would be like.


    PerformSearch(query, 1000, out result) -> result contains metadata for 1 – 1000
    Just visualize all results in your list.

    PerformSearch(query, 2000, out result) -> result contains metadata 1 – 2000
    ONLY visualize results from entry 1001 to 2000.

    There is no other way to mimic the pagination/requesting more hits at this point in time.
    You might want to add this feature request (better support for paginated search results) to the SDL Tridion Docs Idea forum (community.sdl.com/.../).

    Kind Regards,

    Raf
Children
No Data