lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: Alphanumeric Field Comparison : Lucene 4.5
Date Tue, 12 Nov 2013 08:26:57 GMT


What are you intending to do? The example code is lost!

In general, to sort alphanumeric/lexical on a human readable field, you would use the collation
functionalities (needs a separate field for sorting containing the collation keys) provided
by Lucene.

to index the field and then you can do a simple native sort on this field (SortField.STRING).





Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen




From: Umashanker, Srividhya [] 
Sent: Tuesday, November 12, 2013 5:00 AM
Subject: Alphanumeric Field Comparison : Lucene 4.5


Group –


We are looking at sorting lucene doc’s based on a field in alphanumeric order, as we expect
fields to have Alpha numeric characters.

Attached is the AlphaNumericFieldComparatorSource and below is the snippet of its usage.


final SortField sortField_id = new SortField(, new AlphaNumericFieldComparatorSource(),


Is anyone using an easier approach or please share other alternatives that you have tried.





  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message