[
https://issues.apache.org/jira/browse/LUCENE-2380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael McCandless updated LUCENE-2380:
---------------------------------------
Attachment: LUCENE-2380.patch
Very rough first cut patch attached.
I removed getStrings and replaced it with getTerms (returns a BytesRef oriented
getter API for looking up the String from a doc).
And I removed getStringsIndex and replaced it with getTermsIndex.
All lucene tests pass with this hard cutover, but I still need to measure perf
hit: I'm using packed ints currently to hold the offsets, and 1 or 2 byte vInt
prefix (Yonik's idea) to encode the term's length.
I started to cutover Solr as well, and got some things cutover, but decided I
should stop and check if these changes make sense :) So the Solr side of the
patch does not yet compile. I specifically stopped when I got to
StringIndexDocValues (abstract base class for lots of others) -- I'd like to do
a hard cutover of this class to use BytesRef, but does anyone see a problem w/
that? I'm at little nervous about how far "down" I'll end up having to push
the BytesRef... It is marked as "Internal class, subject to change" :) I also
dropped lots of nocommits along the way on the Solr side... so if someone could
have a look and make suggestions that'd help :)
> Add FieldCache.getTermBytes, to load term data as byte[]
> --------------------------------------------------------
>
> Key: LUCENE-2380
> URL: https://issues.apache.org/jira/browse/LUCENE-2380
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Search
> Reporter: Michael McCandless
> Assignee: Michael McCandless
> Fix For: 4.0
>
> Attachments: LUCENE-2380.patch
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]