Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Andy Westley 16 posts 86 karma points
    Apr 13, 2016 @ 21:04
    Andy Westley
    0

    Limit the size of the resultset from an Examine search

    Hi all,

    We're building our first site in Umbraco and we've been advised to use the Examine search to populate our homepage and lists of recent and related content on other pages. I'm gradually piecing together some code that will search all items of a particular document type.

    However, I want to supply an integer to limit the number of search results returned. Some articles I've found online suggested I could supply a maxResults parameter, eg https://github.com/Shazwazza/Examine/wiki/FluentSearchApi says:

    ISearchCriteria searchCriteria = ExamineManager.Instance.SearchProviderCollection["MySearcher"].CreateSearchCriteria(100, IndexType.Content);
    

    When I've tried that I get a compile error with an unrecognised parameter, suggesting it's been removed from the API. If that's the case, what's the suggested method for limiting the size of the resultset. It seems inefficient to return the whole set and then truncate it, given the whole idea of using Examine is for efficiency.

    Can anyone help?

    Cheers

    Andy

  • Samira 113 posts 452 karma points
    Apr 14, 2016 @ 12:27
    Samira
    0

    Hi Andy

    Please refer below link:

    https://our.umbraco.org/forum/developers/api-questions/63510-Limit-the-Examine-search-result

    hope this help

    Regards,

    Samira

Please Sign in or register to post replies

Write your reply to:

Draft