On Wed, Jul 2, 2008 at 10:45 PM, Chris Hostetter <[EMAIL PROTECTED]> 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