lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Quail <m...@ctx.com.au>
Subject Re: Mixing database and lucene searches
Date Wed, 12 May 2004 00:33:24 GMT
> Is it possible to use float and date ranges in that case?  Or maybe I should
> just read the details in the manual and stop asking stupid questions. :-)

There is no such thing as a stupid question ;-)

At the end of the day, Lucene just handles strings; and it handles them
lexocographically. The DateField class turns a Date into a string that
sorts well. (DateField doesn't handle all values of a 'long', though).

For float, you may have to pick some range of floats that you will
allow, and use a java.util.DecimalFormat to format them to a
fixed-width, zero-padded string. If you are going to allow -ve values,
then it gets trickier (I have the trick if you need to know this).

=Matt




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


Mime
View raw message