BooleanQuery.setMinimumNumberShouldMatch(int min) sounds exactly what you need.
--
Ian.
[EMAIL PROTECTED]
On Jan 30, 2008 6:43 PM, Dipsy Kapoor <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using a BooleanQuery of the form:
>T1 OR T2 OR T3 OR .. Tn
> to search on a field in Lucene.
>
> Is
al Message-
From: Dipsy Kapoor [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 30, 2008 8:43 PM
To: java-user@lucene.apache.org
Subject: Retrieving documents that match atleast n query terms
Hi,
I am using a BooleanQuery of the form:
T1 OR T2 OR T3 OR .. Tn
to search on a field in Luc
Hi,
I am using a BooleanQuery of the form:
T1 OR T2 OR T3 OR .. Tn
to search on a field in Lucene.
Is there a way to force the search to return documents that match at
least say 5 of the query Terms?
Thanks,
Dipsy Kapoor
--