lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: Unsupported operation in DocIdSetIterator using lucene 2.9
Date Thu, 13 May 2010 09:47:17 GMT
> I am using lucene 2.9 and I can't understand why a succession of
> un-deprecated methods calls a deprecated method in this class.
> The series of calls is as follows:
>, Collector)
>, Filter, Collector)
> Scorer.score(Collector)
> DocIdSetIterator.nextDoc()
> The javadocs for next() say that you should call nextDoc() but yet the
> nextDoc() method calls next()!

This is he correct behavior for deprecating methods that are intended to be overridden by
users (in this case abstract ones - abstract in 2.4). The reason behind is:

If you have legacy 2.4 code that is not yet updated to use nextDoc(), but only overrided the
previously abstract next(), the backwards layer in the default implementation of DocIdSetIterator
calls next() for you, so the old code still works. If you have code that is already on 3.0
or 2.9 stage, you will override nextDoc() and next() is never used.

The nextDoc() -> next() is therefore only called, when you have an 2.4 legacy class.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message