lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vitaly Funstein <vfunst...@gmail.com>
Subject Re: Types of Queries
Date Fri, 29 Mar 2013 20:11:46 GMT
Something like this will work:

    BooleanQuery query = new BooleanQuery();
    query.add(new MatchAllDocsQuery(), Occur.MUST);
    query.add(new BooleanClause(termQuery, Occur.MUST_NOT));


On Fri, Mar 29, 2013 at 1:06 PM, Paul Bell <arachweb@gmail.com> wrote:

> Hi,
>
> I've done a few experiments in Lucene 4.2 with several different query
> types:
>
> TermQuery
> TermRangeQuery
> NumericRangeQuery
> WildcardQuery
> PrefixQuery
> MatchAllDocsQuery
>
> I think I more or less understand their behavior.
>
> But I'm missing something obvious: how does one do "not equal" type
> queries? For example, suppose I want to find all documents whose "name"
> field is not equal to a given value...
>
> Thank you.
>
> -Paul
>

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