Re: What doc id to use on IndexReader with SetNextReader

2011-04-18 Thread Antony Bowesman
Thanks Uwe, I assumed as much. On 18/04/2011 7:28 PM, Uwe Schindler wrote: Document d = reader.document(doc) This is the correct way to do it. Uwe - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additi

RE: What doc id to use on IndexReader with SetNextReader

2011-04-18 Thread Uwe Schindler
Hi, > Document d = searcher.getIndexReader.document(doc + docBase) This is of course working, but somehow useless as it transforms the ID two times and that slows down a little bit. Inside collectors you should *only* use the IndexReader and Scorer given by the setNextReader / setScorer calls. >

What doc id to use on IndexReader with SetNextReader

2011-04-18 Thread Antony Bowesman
Migrating some code from 2.3.2 to 2.9.4 and I have custom Collectors. Now there are multiple calls to collect and each call needs to adjust the passed doc id by docBase as given in SetNextReader. However, if you want to fetch the document in the collector, what docId/IndexReader combination s