lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: Matching at least N terms of subqueries
Date Sun, 21 May 2006 18:17:44 GMT
On Sunday 21 May 2006 20:01, Chris Hostetter wrote:
> : "wrapping" it with a SpanNearQuery. Unless, there is a way to make
> : Span(Near)Query take a BooleanQuery as its clause. Is there a way to
> ope .. span queries can only contain other span queries -- they need the
> sub queries to propogate up the span information which normal queries
> don't know about.
> : set the min. number of terms to be matched in an OR subquery inside a
> : SpanNearQuery?
> not that i know of ... but you might be able to adopt the code from
> BooleanQUery ... I've never looked at SpanOrQuery close enough to see how
> hard it would be.

Another solution is to use a boolean query with a minimum number
of matching clauses, where the Nth clause has a form like this:
SpanNearQuery(commonTerm, termN).

Paul Elschot

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message