java-user@lucene.apache.org
[Top] [All Lists]

Re: using boolean operators with the PhraseQuery

Subject: Re: using boolean operators with the PhraseQuery
From: Paul Elschot
Date: Sat, 22 Apr 2006 10:28:33 +0200
On Friday 21 April 2006 21:11, Vishal Bathija wrote:
> Hi,
> I am trying to get the frequency of a phrase using the SpanNearQuery.
> How can I use SpanNearQuery for boolean queries. The code I have is
> for a single query. How can I extend this for multiple queries

You can use SpanNearQuery as a clause (subquery) in a BooleanQuery
or in a SpanOrQuery.
See BooleanQuery.add() and the constructor of SpanOrQuery.

Regards,
Paul Elschot

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>