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.
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.
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
ExamineManager.Instance.SearchProviderCollection
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.
Limit the Examine search result
Hi guys!
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
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.
Regards
Ismail
Peter,
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?
Regards
Ismail
Hi Ismail!
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.
thanks,
Peter
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...