org.apache.lucene.search

Class BooleanClause.Occur

Enclosing Class:
BooleanClause
Implemented Interfaces:
Serializable

public static final class BooleanClause.Occur
extends Parameter
implements Serializable

Specifies how terms may occur in matching documents.
See Also:
Serialized Form

Field Summary

static BooleanClause.Occur
MUST
Use this operator for terms that must appear in the matching documents.
static BooleanClause.Occur
MUST_NOT
Use this operator for terms that must not appear in the matching documents.
static BooleanClause.Occur
SHOULD
Use this operator for terms that should appear in the matching documents.

Method Summary

String
toString()

Methods inherited from class org.apache.lucene.util.Parameter

readResolve, toString

Field Details

MUST

public static final BooleanClause.Occur MUST
Use this operator for terms that must appear in the matching documents.

MUST_NOT

public static final BooleanClause.Occur MUST_NOT
Use this operator for terms that must not appear in the matching documents. Note that it is not possible to search for queries that only consist of a MUST_NOT query.

SHOULD

public static final BooleanClause.Occur SHOULD
Use this operator for terms that should appear in the matching documents. For a BooleanQuery with two SHOULD subqueries, at least one of the queries must appear in the matching documents.

Method Details

toString

public String toString()
Overrides:
toString in interface Parameter

Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.