On Tue, Feb 9, 2010 at 11:35 AM, Renaud Delbru <renaud.del...@deri.org> wrote:

>> This particular patch doesn't change the Codecs API -- it "only"
>> factors out the Multi* APIs from MultiReader.  Likely you won't need
>> to change your codec... but try applying the patch and see :)
>>
>
> Ok, good news ;o).

Flex is still in flux, though :)

>> However: if you consume the flex API directly, on top of multi readers
>> (something you shouldn't do, for performance reasons), you will have
>> to use MultiField's static methods to get the enums.
>
> In my previous example (registering my codec in IndexWriter, and then use
> IndexReader), do I consume the flex API directly on top of the multi-readers
> directly ? If yes, how to avoid that ?

You should (when possible/reasonable) instead use
ReaderUtil.gatherSubReaders, then iterate through those sub readers
asking each for its flex fields.

But if this is only for testing purposes, and Multi*Enum is more
convenient (and, once attrs work correctly), then Multi*Enum is
perfectly fine.

Mike

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