[ https://issues.apache.org/jira/browse/LUCENE-1219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578199#action_12578199 ]
Michael McCandless commented on LUCENE-1219: -------------------------------------------- Alas, I'm not really happy with introducing this API at the AbstractField level and not in Fieldable. It's awkward that we've deprecated binaryValue() in AbstractField and not in Fieldable. But, I think it's our only way forward with this issue without breaking backwards compatibility. In 3.0 I'd like to at least promote this API up into Fieldable, but even that is somewhat messy because I think in 3.0 we would then deprecate binaryValue() and move these 3 new methods up from AbstractField. What I'd really like to do in 3.0 is change Fieldable to not be an abstract base class instead. Question: could we simply move forward without Fieldable? Ie, deprecate Fieldable right now and state that the migration path is "you should subclass from AbstractField"? I would leave "implements Fieldable" in AbstractField now, but remove it in 3.0. As far as I can tell, all uses of Fieldable in Lucene are also using AbstractField. I guess I don't really understand the need for Fieldable. In fact I also don't really understand why we even needed to add AbstractField. Why couldn't FieldForMerge and LazyField subclass Field? It's somewhat awkward now because we have newly added APIs to Field, like setValue(*), which probably should have been added to Fieldable. > support array/offset/ length setters for Field with binary data > --------------------------------------------------------------- > > Key: LUCENE-1219 > URL: https://issues.apache.org/jira/browse/LUCENE-1219 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Reporter: Eks Dev > Assignee: Michael McCandless > Priority: Minor > Attachments: LUCENE-1219.patch, LUCENE-1219.patch, LUCENE-1219.patch, > LUCENE-1219.patch, LUCENE-1219.take2.patch > > > currently Field/Fieldable interface supports only compact, zero based byte > arrays. This forces end users to create and copy content of new objects > before passing them to Lucene as such fields are often of variable size. > Depending on use case, this can bring far from negligible performance > improvement. > this approach extends Fieldable interface with 3 new methods > getOffset(); gettLenght(); and getBinaryValue() (this only returns reference > to the array) > -- 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]