lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Sorting and multi-term fields again
Date Thu, 05 Mar 2009 23:07:44 GMT
: TrieRange fields is needed), I again thought about the issue. Maybe we could
: change FieldCache to only put the very first term from a field of the
: document into the cache, enabling sorting against this field. If possible,
: this would be very nice and in my opinion better that the idea proposed in
: the issue.

in the fairly common case of tokenized fields, the "first" term found 
during enumeration isn't neccessarily (or even frequently) the "first" 
term in the pre-tokenized string ... so this doesn't help people very 
much.

the recommended solution in the tokenized case is to have a "duplicate" 
non tokenized field -- that seems like the best solution in the 
non-tokenized case as well (where the caller is conciously choosing to add 
multiple Field instances with the same fieldName to a a Document)...  pick 
which Field Value represents the value you want used during sorting, and 
add that value to the documetning using an alternate fieldName.

I've never encountered any serious objecting to this approach.


-Hoss


---------------------------------------------------------------------
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