lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aviran" <amo...@infosciences.com>
Subject RE: Problem with Sort logic ?
Date Mon, 26 Jul 2004 13:25:01 GMT
Do you think that another FieldCache implementation will be beneficiary for
those who want to sort on any field other than keyword.
I bet that a lot of  developers will want to have the ability to sort on ANY
field, without having to duplicate all the fields as keywords.

Aviran

-----Original Message-----
From: Doug Cutting [mailto:cutting@apache.org] 
Sent: Friday, July 23, 2004 17:49 PM
To: Lucene Developers List
Subject: Re: Problem with Sort logic ?


The term is used because it is *much* more efficient.  If you need to 
sort by an untokenized value, also index the field as a keyword, and 
don't store the tokenized version of the field.

Doug

Aviran wrote:
> When you set s SortField to a Text field which gets tokenized 
> FieldCacheImpl uses the term to do the sort, but then sorting is off 
> especially with more then one word in the field. I think it is much 
> more logical to sort by field's string value 
> (document(t).getField(field).stringValue()) instead of just the term, 
> this way the result is sorted by the actual field's value and not the 
> tokenized, analyzed term, which can be the identical for several 
> different values.
>  
> For Example:
> John R Smith = John Smith
>  
> Thoughts ?
>  
> Aviran
>  
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message