lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ian parkin <iapar...@yahoo.com>
Subject Help with custom sorting - ignoring case on string fields.
Date Wed, 06 Jul 2005 17:46:22 GMT
Hello Folks,

Previously, I was using version 1.3 of Lucene that had no complex
sorting abilities, so I wrote my own code to do this using a TreeMap
and Comparator. The sorting was basically lower case comparisons of
strings with a few extra little tweaks here and there.

This past weekend I upgraded to 1.4.3 of Lucene and am looking for
some help with custom sorting code. 

My application stores a couple of mixed-case text fields 'author' and
'title' as Field.Text and I would like to sort on these fields in a
case insensitive manner.

I have been looking at the DistanceComparatorSource example in the
'Lucene In Action' book and have been trying to adapt that to my
humble needs, but so far no luck. For some reason, I just can't get
my head round the example in order to tailor it to my needs.

Does anyone have any example ComparatorSource code that sorts strings
ignoring the case ?

Thanks

IAP

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message