On 10/30/06, KEGan <[EMAIL PROTECTED]> wrote:
Newbie question. How do we index floating point number in Lucene, so that it is sortable ? There is a built-in utility class 'NumberTools' which help with indexing integer. Does Lucene has the same mechanism for floating point number?
You can look at NumberUtils in Solr, it has conversions for int/long/float/double that make strings that sort correctly (for range queries as well as sorts). If you use Solr, these transformations are automatically applied during indexing and querying depending on the declared type of the field. http://svn.apache.org/viewvc/incubator/solr/trunk/src/java/org/apache/solr/util/NumberUtils.java?view=markup -Yonik http://incubator.apache.org/solr Solr, the open-source Lucene search server --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]