lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1219) support array/offset/ length setters for Field with binary data
Date Fri, 08 Aug 2008 23:56:44 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-1219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621099#action_12621099
] 

Michael McCandless commented on LUCENE-1219:
--------------------------------------------

bq. realized I am missing actual length we read in LazyField

Duh, right.

Though: 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).

bq. Some sort of lower level callback interface to populate a Document might even eliminate
the need for some of the FieldSelector stuff... or at least it would mostly be independent
of the field reading code and users could create more advanced implementations.

This sounds interesting... but how would you re-use your own byte[] with this approach?

> 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.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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message