lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karthick Duraisamy Soundararaj <karthick.soundara...@gmail.com>
Subject TopScoreDocsCollector.create overloads
Date Fri, 10 Aug 2012 16:33:23 GMT
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

Mime
View raw message