Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'd like to limit the size of the returning result set of my examine search to gain performance. I've found that lucene's
Lucene.Net.Search.Searcher class supports it, but I've not found any clue of this on the Examine ISearcher class.
Can this be achieved somehow?
thanks in advance,Peter
As far as I am aware with Examine you cannot limit results returned however you can do a .Take() on the returned results, still means you are returning everything from lucene but not to your display layer.
Just had a look at the code on github and https://github.com/Shazwazza/Examine/blob/82043c8dd204a79316098d2d5b9004dd0a6d4645/Projects/Examine/LuceneEngine/Providers/BaseLuceneSearcher.cs line 167 there is overloaded search method that takes maxResults parameter. Which version of Examine are you using?
Thanks for you feedback perfect, I'm using version 0.1.60.2941, the ones that umbraco 7.2.4 ships with, and just noticed that
returns a BaseLuceneSearcher, which actually has the write overload, thanks!
1 question still remains which just came into my mind: is there a method which returns only the count of the result set, without the limitation? So Examine does not build the documents, only returns a count.
I am also looking to returns only the count of results, not results themselves.
Have you found the answer to your question?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted