lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Keegan" <peterlkee...@gmail.com>
Subject Re: Mixing SpanQuery and BooleanQuery
Date Mon, 06 Aug 2007 19:18:32 GMT
Even without 'interesting' slops, it does appear that SpanNearQuery is a
logical AND of all its clauses.
I was distracted by the BooleanQuery examples in the javadocs :)

thanks,
Peter

On 8/6/07, Erick Erickson <erickerickson@gmail.com> wrote:
>
> Isn't a SpanAndQuery the same as a SpanNearQuery? Perhaps
> with "interesting" slops......
>
> Erick
>
> On 8/6/07, Peter Keegan <peterlkeegan@gmail.com> wrote:
> >
> > I'm trying to create a fairly complex SpanQuery from a binary parse
> tree.
> > I create SpanOrQueries from SpanTermQueries and combine SpanOrQueries
> into
> > BooleanQueries. So far, so good.
> > The problem is that I don't see how to create a SpanNotQuery from a
> > BooleanQuery and a SpanTermQuery. I want the BooleanQuery to be the
> > 'include' span and the SpanTermQuery to be the 'exclude' span.
> > Unfortunately, the BooleanQuery cannot be cast to a SpanQuery.
> >
> > I thought that SpanQuery and BooleanQuery could be freely intermixed,
> but
> > this doesn't seem to be the case. It seems that what's really needed is
> a
> > 'SpanAndQuery'.
> >
> > Is there another way to build this type of query?
> >
> > Thanks,
> > Peter
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message