lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <yo...@apache.org>
Subject Re: Fetching float or int fields from index by Lucene document
Date Thu, 03 Jul 2008 02:58:43 GMT
On Wed, Jul 2, 2008 at 10:45 PM, Chris Hostetter
<hossman_lucene@fucit.org> wrote:
> It never really occured to me before, but it is kind of weird that there
> is a toInternal and a toExternal and an indexedToReadable -- but there is
> no readableToIndexed ... toInternal is used both for the "indexed" value
> and for the "stored" value, so things like SortableIntField wind up
> "storing" an encoded value even though there isn't much need for it.

Legacy stuff in a way.  In the beginning there was only toInternal()
and toExternal().  I added indexedToReadable(), storedToReadable(),
storedToIndexed() later for more completeness.  I think I didn't add a
readableToIndexed() since that was really what toInternal() was.

Really, the stored field could be a normal readable value - no reason
it has to match the indexed value.
I made them the same as an optimization to bypass the analyzer since
there was no way to just give the token directly to the IndexWriter
(worth it?  I don't know...)

-Yonik

Mime
View raw message