You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Song, Xuekai" <Xu...@broadvision.com> on 2003/05/15 17:28:06 UTC

Number Query

Is it possible to search using a query like price:>15.00 or something
similar.  This does not seem possible to me since '<' and '>' are not query
operators.  Also, the index created for filed 'price' is String.  Is there
any workaround? 

Thanks in advance,

Kai

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


RE: Number Query

Posted by Aviran Mordo <am...@infosciences.com>.
You can use RangeQuery to do a range search. If you want to index
numbers you should put leading 0 (zero) in order for the range to work.
For instance: 15.00 should be indexed as 00000015.00

-----Original Message-----
From: Song, Xuekai [mailto:Xuekai.Song@broadvision.com] 
Sent: Thursday, May 15, 2003 11:28 AM
To: lucene-user@jakarta.apache.org
Subject: Number Query


Is it possible to search using a query like price:>15.00 or something
similar.  This does not seem possible to me since '<' and '>' are not
query operators.  Also, the index created for filed 'price' is String.
Is there any workaround? 

Thanks in advance,

Kai

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