Hi Paul, I have seen Filter feature and search how to use it to solve my problem. But users can search in indeterminate range so I don't find how to use filters in that case.
Mickaël -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Envoyé : mardi 12 juillet 2005 10:16 À : java-user@lucene.apache.org Objet : Re: Lucene and numerical fields search I have similar requirements. To get around the "Too many clauses" problem I am creating a Filter (this takes one or two seconds to create on an index of around 250000 documents) instead of using the RangeQuery. It's not ideal but it does sidestep the problem. If you are using the same range in your queries then you can cache the filters and these can be reused on the same IndexReader/IndexSearcher instance. Paul I. Rifflard Mickaël <Mickael.Rifflard @atosorigin.com> To <java-user@lucene.apache.org> 12/07/2005 08:49 cc Subject Please respond to Lucene and numerical fields search [EMAIL PROTECTED] apache.org 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]