As I mentioned in my original post, I am calling like the below:

MyCollector collector;
                TopScoreDocCollector topScore =
TopScoreDocCollector.create(firstIndex+numHits, true);
                IndexSearcher searcher = new IndexSearcher(reader);
                try {
                    collector = new MyCollector(indexReader, new
PositiveScoresOnlyCollector(topScore));
                    searcher.search(query, (Filter) null, collector);
                } finally {
                 
                } 

The searchAfter method does not take any collector. I want the
collector.collect(int doc) to be called only for the next set and not from
the starting. If a request comes for the first set, it would be like:

TopScoreDocCollector topScore = TopScoreDocCollector.create(0+100, true);

the collector should call only 1- 100 and for the next set

TopScoreDocCollector topScore = TopScoreDocCollector.create(101+100, true);

it should call from 101 - 200 and not from 0-200.

Thanks,
Sai.







--
View this message in context: 
http://lucene.472066.n3.nabble.com/Collector-is-collecting-more-than-the-specified-hits-tp4117329p4117901.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to