lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Armbrust, Daniel C." <Armbrust.Dan...@mayo.edu>
Subject RE: Searching greater than/less than
Date Wed, 22 May 2002 16:24:46 GMT
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:dsmiley@mac.com]
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-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:lucene-user-
> help@jakarta.apache.org>
>


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

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


Mime
View raw message