lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Sort by Title Issue
Date Thu, 27 Oct 2005 17:52:14 GMT

: I am trying to perform a sort by title field search, but am receiving
: the following error.  The search seems to have problems with field
: values that have multiple words.  It sorts single word values with no
: problem.  Any help will be appreciated.  I indexed the title field as
: Field.text(String, String).

Sorting works by looking at all of the indexed values for the field you
are sorting on, and then walking the list of values in order, pulling out
the documents associated with each.

When you tokenize a field, multiple values can be indexed for each
document, and the sorting code doesn't know how to deal with these
multiple terms.  The best course of action in a situation like this, is to
index the field, but not tokenize it - using something like
Field.Keyword(String,String).  The only catch to this, is that you will no
longer be able to search on individual "words" of the field.  If you wnat
to do both, you should make two fields - one tokenized, and one not.
search on the tokenized field, and sort on the non-tokenized field.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message