Hi.

I'm trying to retrieve field values in my own LeafCollector (Lucene 8.11.1). 
But I didn't find good tutorial how to do it.
So, I get SortedSetDoc from LeafReader, then Lucene calls my implementation of 
LeafCollector.collect() method, and I try to get values from SortedSetDoc 
inside my implementation of LeafCollector.collect() method.

What should I call for move SortedSetDoc's pointer to the required 
document('doc' parameter of LeafCollector.collect(int doc)) ? advance(doc) or 
advanceExact(doc) ?

I'm using SortedSetDoc.advanceExact() and it works good.

But when I'm trying to call BinaryDocValues.advanceExact() for other field, it 
always returns true (see Lucene80DocValuesProducer.java:685), even in case doc 
>= maxDoc.
If I'm using advance(doc) and checking that "advance(doc)==doc" (against case 
of "document number is greater to target") - it works good.

But SortedSetDoc.advance(doc) always returns 'doc+1', not a 'doc' 
(IndexedDISI.java:385).

--
Alexander Buloichik

Reply via email to