lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane James Vaucher <vauch...@cirano.qc.ca>
Subject Re: Storing numbers
Date Fri, 05 Mar 2004 17:19:31 GMT
Weird idea, how about transforming your long into a Date and using a
DateFilter to use a ranged query?

sv

On Fri, 5 Mar 2004, Erik Hatcher wrote:

> Terms in Lucene are text.  If you want to deal with number ranges, you
> need to pad them.
>
> "000000000001" for example.  Be sure all numbers have the same width
> and zero padded.
>
> Lucene use lexicographical ordering, so you must be sure things collate
> in this way.
>
> 	Erik
>
> On Mar 5, 2004, at 11:46 AM, lucene@nitwit.de wrote:
>
> > On Friday 05 March 2004 15:42, Otis Gospodnetic wrote:
> >> Try with Field.Keyword.
> >
> > Ok, works.
> >
> > Another problem: Range searches don't work.
> >
> > 	"id:(1 TO 1069421083284)"
> >
> > does return only 1 hit - 1069421083284.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
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