lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] Commented: (LUCENE-2380) Add FieldCache.getTermBytes, to load term data as byte[]
Date Wed, 07 Apr 2010 18:32:33 GMT


Uwe Schindler commented on LUCENE-2380:

This goes again in the direction of not having arrays in FieldCache anymore, but instead have
accessor methods taking a docid and giving back the data (possibly as a reference). So getBytes(docid)
returns a reused BytesRef with offset and length of the requested term. For native types we
should also go away from arrays and only provide accessor methods. Java is so fast and possiby
inlines the method call. So for native types we could also use a FloatBuffer or ByteBuffer
or whatever from java.nio.

> Add FieldCache.getTermBytes, to load term data as byte[]
> --------------------------------------------------------
>                 Key: LUCENE-2380
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>             Fix For: 3.1
> With flex, a term is now an opaque byte[] (typically, utf8 encoded unicode string, but
not necessarily), so we need to push this up the search stack.
> FieldCache now has getStrings and getStringIndex; we need corresponding methods to load
terms as native byte[], since in general they may not be representable as String.  This should
be quite a bit more RAM efficient too, for US ascii content since each character would then
use 1 byte not 2.

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