lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eks Dev (JIRA)" <>
Subject [jira] Updated: (LUCENE-1219) support array/offset/ length setters for Field with binary data
Date Sat, 09 Aug 2008 13:16:44 GMT


Eks Dev updated LUCENE-1219:

    Attachment: LUCENE-1219.extended.patch

bq. couldn't you just call document.getFieldable(name), and then call binaryValue(byte[] result)
on that Fieldable, and then get the length from it (getBinaryLength()) too? (Trying to minimize
API changes).

sure, good tip, I this could work.  No need to have this byte[]->Fieldable-byte[] loop,
it confuses. I have attached patch that uses this approach. But I created getBinaryValue(byte[])
instead of binaryValue(byte[]) as we have binaryValue() as deprecated method (would be confusing
as well). Not really tested, but looks simple enough 

Just thinking aloud
This is one nice feature, but I permanently had a feeling I do not understand this Field structures,
roles and responsibilities :)  Field/Fieldable/AbstractField hierarchy is really ripe for
good re-factoring.This bigamy with index / search use cases makes things not really easy to
follow, Hoss has right, we need some way to divorce RetrievedField from FieldToBeIndexed,
they are definitely not the same, just very similar.   

> support array/offset/ length setters for Field with binary data
> ---------------------------------------------------------------
>                 Key: LUCENE-1219
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Eks Dev
>            Assignee: Michael McCandless
>            Priority: Minor
>         Attachments: LUCENE-1219.extended.patch, LUCENE-1219.extended.patch, LUCENE-1219.patch,
LUCENE-1219.patch, LUCENE-1219.patch, LUCENE-1219.patch, LUCENE-1219.take2.patch, LUCENE-1219.take3.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:
For additional commands, e-mail:

View raw message