Just a note - I have used this method (the date filtering style of filtering) on an index of 12 million documents, and haven't had a problem with performance.
I need to set up some tests, however, and see if it is faster to filter with the date filter style of filtering, or filter by building the query for every number you want returned. My guess is that if you are looking for numbers on the scale of 10 < x < 50 it would be faster to write the query to search for 11, 12, 13, 14, 15, .... 49 But if you are looking for numbers on the scale of 5 < x < 10000 it will be faster to do the date filter style of filtering. This is just a hunch, however, and I'm sure depends on the range of numbers in your index, and the number of docs in it. It would be nice to know, however, roughly where the scale tips from one way being faster than the other. If anyone has tested this, maybe an entry on the FAQ page is in order. Or, the whole thing could be alleviated, if lucene supported a number field, rather than just text, and date field (which seems like it was implemented as an afterthought, and is useless (as written) if your dates go farther back than ~1970. Maybe put that on the list of possible next version ideas. -----Original Message----- From: David Smiley [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 21, 2002 8:54 PM To: Lucene Users List Subject: Re: Searching greater than/less than Yes. Check out how Date support is implemented. As a quick workaround... you could piggy-back on Lucene's existing date support by creating a Date via milliseconds that is the number your are trying to put in the index. Note that internally, a bit-vector is created that is the same size as the index which might cause performance problems depending on the size of your index and typical queries you will have in your environment. ~ Dave Smiley On Tuesday, May 21, 2002, at 08:53 PM, Victor Hadianto wrote: > Can I use lucene to search greater than / less than a value in the > field? I > have a field in the document that function as a score. I would need > to be > able to search the index + the option having to say a field > 50 > > Regards, > > -- > Victor Hadianto > > -- > To unsubscribe, e-mail: <mailto:lucene-user- > [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:lucene-user- > [EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>