lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renaud Delbru <>
Subject Flex & Docs/AndPositionsEnum
Date Tue, 09 Feb 2010 12:04:44 GMT
Hi Michael,

I have updated my lucene-1458, and I discovered there was big 
modifications in the StandardCodec interface.
I updated my own codecs to this new interface, but I encounter a 
problem. My codecs are creating DocsAndPositionsEnum subclasses that 
allow to access more information than simply the doc, freq and position 
(I have other information encoded into the Prox file).
In the code, to be able to manipulate the additional interface that my 
classes provide, I was casting the DocsAndPositionsEnum object returned 
by IndexReader#termPositionsEnum() into the correct subclass. While this 
approach was working in the previous flewx branch, this does not work 
anymore with the last committed changes. In certain cases, the 
IndexReader#termPositionsEnum() does not return the DocsAndPositionsEnum 
created by the StandardPostingsReader, but a MultiDocsAndPositionsEnum. 
However, I am not able either to subclass the MultiDocsAndPositionsEnum 
or to wrap it into a decorator because it is declared as 'private static 
final' in DirectoryReader.

Are these classes (MultiTermEnum, MultiDocsAndPositionsEnum, etc.) 
hidden in a voluntary manner ? Or is there is another way to extends 
StandardCodec without having to deal with these classes ?

Renaud Delbru

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

View raw message