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:
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.
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:
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
is working on a reply...