You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Karthick Duraisamy Soundararaj <ka...@gmail.com> on 2012/08/10 18:33:23 UTC

TopScoreDocsCollector.create overloads

I see that the TopScoreDocCollector is able to collect Top N docs for a
given query.  Depending on whether or not the docIds are collected in-order
or out-of-order, InOrderTopScoreDocCollector
or OutOfOrderTopScoreDocCollector is used. Now,
 InOrderPagingScoreDocCollector & OutOfOrderPagingScoreDocCollector seems
to provide paging. I am not able to see a place in solr where its being
used.

case 1:
Lets assumes I make a request with start=0&rows=100,
                 then a min heap (priority Queue) seems to get initialized
with 100+X rows, where X is like prefetch factor.

case 2:
Now, when I make the request with start=100&rows=100
                  again a min heap (priority Queue) seems to get
initialized with 200+X rows, where X is like prefetch factor.

In case 2, wouldnt InOrderPagingScoreDocCollector or
OutOfOrderPagingScoreDocCollector save us in memory usage by allocating
100+X rows instead of 200+X rows although there will not be any other
advantage of using it?

Thanks,
Karthick