org.apache.lucene.search

Class BooleanClause

public class BooleanClause extends Object implements Serializable

A clause in a BooleanQuery.
Nested Class Summary
static classBooleanClause.Occur
Specifies how terms may occur in matching documents.
Field Summary
booleanprohibited
If true, documents documents which do match this sub-query will not match the boolean query.
Queryquery
The query whose matching documents are combined by the boolean query.
booleanrequired
If true, documents documents which do not match this sub-query will not match the boolean query.
Constructor Summary
BooleanClause(Query q, boolean r, boolean p)
Constructs a BooleanClause with query q, required r and prohibited p.
BooleanClause(Query query, BooleanClause.Occur occur)
Constructs a BooleanClause.
Method Summary
booleanequals(Object o)
Returns true iff o is equal to this.
BooleanClause.OccurgetOccur()
QuerygetQuery()
inthashCode()
Returns a hash code value for this object.
booleanisProhibited()
booleanisRequired()
voidsetOccur(BooleanClause.Occur occur)
voidsetQuery(Query query)
StringtoString()

Field Detail

prohibited

public boolean prohibited

Deprecated: use setOccur instead

If true, documents documents which do match this sub-query will not match the boolean query.

query

public Query query

Deprecated: use setQuery instead

The query whose matching documents are combined by the boolean query.

required

public boolean required

Deprecated: use setOccur instead

If true, documents documents which do not match this sub-query will not match the boolean query.

Constructor Detail

BooleanClause

public BooleanClause(Query q, boolean r, boolean p)

Deprecated: use BooleanClause(Query, Occur) instead

Constructs a BooleanClause with query q, required r and prohibited p.

BooleanClause

public BooleanClause(Query query, BooleanClause.Occur occur)
Constructs a BooleanClause.

Method Detail

equals

public boolean equals(Object o)
Returns true iff o is equal to this.

getOccur

public BooleanClause.Occur getOccur()

getQuery

public Query getQuery()

hashCode

public int hashCode()
Returns a hash code value for this object.

isProhibited

public boolean isProhibited()

isRequired

public boolean isRequired()

setOccur

public void setOccur(BooleanClause.Occur occur)

setQuery

public void setQuery(Query query)

toString

public String toString()
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.