On Sun, Feb 3, 2019 at 10:41 AM Michael Sokolov <msoko...@gmail.com> wrote:
> > In single-threaded mode we can check against minCompetitiveScore and > terminate collection for each segment appropriately, > > > Does Lucene do this today by default? That should be a nice > optimization, > and it'd be safe/correct. > > Yes, it does that today (in TopFieldCollector -- see > > https://github.com/msokolov/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/search/TopFieldCollector.java#L225 > ) > Ahh -- great, thanks for finding that. > Re: our high cost of collection in static ranking phase -- that is true, > Mike, but I do also see a nice improvement on the luceneutil benchmark > (modified to have a sorted index and collect concurrently) using just a > vanilla TopFieldCollector. I looked at some profiler output, and it just > seems to be showing more time spent walking postings. > Yeah, understood -- I think pro-rating the N collected per segment makes a lot of sense. Mike McCandless http://blog.mikemccandless.com