Hi, Dear colleagues!
I have one question concerning IndexReader.getSequentialSubReaders()
and it's usage.

Imagine there is a class extending DirectoryReader or MultiReader.
Usually directory- or multi-reader consists of sub-readers (i.e.
segment-readers). Is it safe enough to return always null in
IndexReader.getSequentialSubReaders() ?

We have a special Query and Weight classes that relies on custom
extended IndexReader. If this method (getSequentialSubReaders) is not
overridden, then our Weight class receives ReadOnlySegmentReader
instance.
I found that IndexSearcher.search(...) method changed in lucene
2.4.1->2.9.2, so subReaders are passed instead of original reader.
I've also found, that returning null in
IndexReader.getSequentialSubReaders() will avoid usage of subReaders.
Seems returning the null helped and tests pessed.
But there is a question, is it safe enough to return null in
IndexReader.getSequentialSubReaders() ? Would it break some internal
logic?

Thanks much!
--
Best regards, Nikolay Zamosenchuk
eXo (UA)

---------------------------------------------------------------------
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