lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rifflard Mickaël <Mickael.Riffl...@atosorigin.com>
Subject Lucene and numerical fields search
Date Tue, 12 Jul 2005 07:49:29 GMT
Hi all,

I'm using Lucene as a fulltext search engine since a year now and this one works well for
this.
Now, I want to add to my application search capability like : aField greater than 10 , aField
between 10 and 20.
For this, I used RangeQuery (aField:[10 TO 20] for exemple) and I received all documents with
field between these 2 values.
All was perfect before... benchs. These one were poor. I received results after dozens of
seconds.

Here is reasons of this : 

Firstly, I don't know min or max values for my field so a request can be aField:[0 TO 1000000].

If I understand, this request is tranform in a BooleanQuery with one million of TermQuery
separated by OR.

Secondly, to perform greater than or lower than request, I wanted to use RangeQuery with Integer.MAX_VALUE
(for greater than) 
or Integer.MIN_VALUE (for lower than). If I understand always, this RangeQuery would be transform
in a BooleanQuery with many 
millions of TermQuery. 

How to perform this kind of searchs (with another Lucene use, with anoter solution, ...) ?

Many thanks for your comments.


	Mickaël Rifflard



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


Mime
View raw message