[
https://issues.apache.org/jira/browse/LUCENE-2154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789875#action_12789875
]
Uwe Schindler commented on LUCENE-2154:
---------------------------------------
I tried to implement that with JDK's reflect.Proxy, which would be really cool,
but sucess stopped once I reached the point that the attribute interface
implementation must subclass AttributeImpl vs. generated proxies subclass
reflect.Proxy.
A fix would be to use cglib, but that would be an external reference. With
cglib it would even be possible to autogenerate a fast proxy without reflection
at all (e.g. using the Emitter class on the lowest level)!
The only current solution I see is to enforce all Attributes not only to
implement a *Impl, but also provide a class *Proxy, that respects the above
code. But this classes would be so stupid (only contain a modifiable delegate
of the same attribute type and forward all methods to it). Cglib code that does
this is hard stuff, but simply to implement.
> Need a clean way for Dir/MultiReader to "merge" the AttributeSources of the
> sub-readers
> ---------------------------------------------------------------------------------------
>
> Key: LUCENE-2154
> URL: https://issues.apache.org/jira/browse/LUCENE-2154
> Project: Lucene - Java
> Issue Type: Bug
> Components: Index
> Affects Versions: Flex Branch
> Reporter: Michael McCandless
> Fix For: Flex Branch
>
>
> The flex API allows extensibility at the Fields/Terms/Docs/PositionsEnum
> levels, for a codec to set custom attrs.
> But, it's currently broken for Dir/MultiReader, which must somehow share
> attrs across all the sub-readers. Somehow we must make a single attr source,
> and tell each sub-reader's enum to use that instead of creating its own.
> Hopefully Uwe can work some magic here :)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]