BooleanClausepublic class BooleanClause extends Object implements SerializableA clause in a BooleanQuery. |
Fields Summary |
---|
public Query | queryThe query whose matching documents are combined by the boolean query. | public boolean | requiredIf true, documents documents which do not
match this sub-query will not match the boolean query. | public boolean | prohibitedIf true, documents documents which do
match this sub-query will not match the boolean query. |
Constructors Summary |
---|
public BooleanClause(Query q, boolean r, boolean p)Constructs a BooleanClause with query q , required
r and prohibited p .
query = q;
required = r;
prohibited = p;
|
Methods Summary |
---|
public boolean | equals(java.lang.Object o)Returns true iff o is equal to this.
if (!(o instanceof BooleanClause))
return false;
BooleanClause other = (BooleanClause)o;
return this.query.equals(other.query)
&& (this.required == other.required)
&& (this.prohibited == other.prohibited);
| public int | hashCode()Returns a hash code value for this object.
return query.hashCode() ^ (this.required?1:0) ^ (this.prohibited?2:0);
|
|