lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "naveen.quill" <>
Subject how to sort the result by ignoring case in lucene
Date Fri, 21 Nov 2008 05:57:12 GMT


I have a query regarding the sorting techniques in the lucene i.e
if i apply the sort method to the search results, lucene is sorting the
results by, without ignoring case, so, how to apply the sort technique that
it should sort by ignoring case

i.e : 
if the results value are : {ACB, abc, adc, Aad}, 
After sorting the results by lucene : {Aad, ACB, abc, adc} [here the lucene
is taking uppercase words first to sort the results then lowercase],
but i need to get the results in this order : {Aad, abc, ACB, adc}

so how to sort the results by ignoring case

here is my code :
String queryComplex = "110_a_t:a* 110_a_t:A*";
SortField sortField = new SortField("110_a_t", SortField.STRING);
Sort sort = new Sort(sortField);
QueryParser queryParser=new QueryParser("",new StandardAnalyzer());
Query query = queryParser.parse(queryComplex);, sort);
View this message in context:
Sent from the Lucene - Java Users mailing list archive at

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

View raw message