lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Sorting case-insensitively
Date Tue, 01 Jul 2008 09:27:34 GMT

On Jun 30, 2008, at 11:08 PM, Paul J. Lucas wrote:

> On Jun 30, 2008, at 7:00 PM, Erik Hatcher wrote:
>> On Jun 30, 2008, at 8:55 PM, Paul J. Lucas wrote:
>>> If I have a SortField with a type of STRING, is there any way to  
>>> sort in a case-insensitive manner?
>> Only if you unify the case (lower case everything) on the client  
>> side that you send to Solr, but in general no.
>> You can use a text field type that uses a KeywordTokenizer(Factory)  
>> and lowercase on the Solr-side though.  The Solr example schema has  
>> one such "alphaOnlySort" field type.
> Couldn't I also use a custom SortComparator?

Oops, sorry, my reply was off-base for java-user.  I replied as if,  
obviously, it was solr-user.

And yes, you could use a custom SortComparator for this case.


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

View raw message