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 Victor Hadianto <vi...@nuix.com.au> on 2003/04/09 03:46:23 UTC
Searching greater/less than using Lucene
Hi,
I'm haven't touch Lucene for ages and now revisiting it back, so please bear
with me. The following is my problem.
I am indexing a bunch of emails and part of the field that I index in the
document is the message size. We adjusted the size and padded with leading
zeroes to normalised the number.
Currently we implemented the search for greater than and less than as a
filter.
Now the requirement has been changed that we need to include the message size
as search parameter, for example:
From: victorh@nuix.com.au OR message size > 10K
First thing come to me is I have to run the query twice first as "From:
victorh@nuix.com.au" and do another query to search ALL emails, filter the
bunch and union the results, but this, admitedly, ugly and inefficient.
I'm stumped, does anyone has any idea/suggestions how should I tackle this
particular issue.
Cheers,
--
Victor Hadianto
NUIX Pty Ltd
Level 8, 143 York Street, Sydney 2000
Phone: (02) 9283 9010
Fax: (02) 9283 9020
This message is intended only for the named recipient. If you are not the
intended recipient you are notified that disclosing, copying, distributing
or taking any action in reliance on the contents of this message or
attachment is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Searching greater/less than using Lucene
Posted by Victor Hadianto <vi...@nuix.com.au>.
> Now the requirement has been changed that we need to include the message
> size as search parameter, for example:
>
> From: victorh@nuix.com.au OR message size > 10K
>
Ah .. I've just found a way to do this using RangeQuery. This combine with
BooleanQuery shoud be able to fix my problem.
--
Victor Hadianto
NUIX Pty Ltd
Level 8, 143 York Street, Sydney 2000
Phone: (02) 9283 9010
Fax: (02) 9283 9020
This message is intended only for the named recipient. If you are not the
intended recipient you are notified that disclosing, copying, distributing
or taking any action in reliance on the contents of this message or
attachment is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org