Apache Lucene.Net 2.4.0 Class Library API

BooleanQuery Members

BooleanQuery overview

Public Static Methods

GetAllowDocsOutOfOrder Whether hit docs may be collected out of docid order.
GetMaxClauseCountReturn the maximum number of clauses permitted, 1024 by default. Attempts to add more than the permitted number of clauses cause {@link TooManyClauses} to be thrown.
GetUseScorer14 
SetAllowDocsOutOfOrder Expert: Indicates whether hit docs may be collected out of docid order. Background: although the contract of the Scorer class requires that documents be iterated in order of doc id, this was not true in early versions of Lucene. Many pieces of functionality in the current Lucene code base have undefined behavior if this contract is not upheld, but in some specific simple cases may be faster. (For example: disjunction queries with less than 32 prohibited clauses; This setting has no effect for other queries.) Specifics: By setting this option to true, calls to {@link HitCollector#Collect(int,float)} might be invoked first for docid N and only later for docid N-1. Being static, this setting is system wide.
SetMaxClauseCount 
SetUseScorer14 

Public Instance Constructors

BooleanQuery Overloaded. Initializes a new instance of the BooleanQuery class.

Public Instance Methods

AddOverloaded. Adds a clause to a boolean query.
ClausesReturns the list of clauses in this query.
Clone 
Combine (inherited from Query)Expert: called when re-writing queries under MultiSearcher. Create a single query suitable for use by all subsearchers (in 1-1 correspondence with queries). This is an optimization of the OR of all queries. We handle the common optimization cases of equal queries and overlapping clauses of boolean OR queries (as generated by MultiTermQuery.rewrite() and RangeQuery.rewrite()). Be careful overriding this method as queries[0] determines which method will be called and is not necessarily of the same type as the other queries.
EqualsReturns true iff
o
is equal to this.
ExtractTerms 
GetBoost (inherited from Query)Gets the boost for this clause. Documents matching this clause will (in addition to the normal weightings) have their score multiplied by
b
. The boost is 1.0 by default.
GetClausesReturns the set of clauses in this query.
GetHashCodeReturns a hash code value for this object.
GetMinimumNumberShouldMatch Gets the minimum number of the optional BooleanClauses which must be satisifed.
GetSimilarity 
GetType (inherited from Object)Gets the Type of the current instance.
IsCoordDisabledReturns true iff {@link Similarity#Coord(int,int)} is disabled in scoring for this query instance.
Rewrite 
SetBoost (inherited from Query)Sets the boost for this query clause to
b
. Documents matching this clause will (in addition to the normal weightings) have their score multiplied by
b
.
SetMinimumNumberShouldMatch Specifies a minimum number of the optional BooleanClauses which must be satisfied. By default no optional clauses are necessary for a match (unless there are no required clauses). If this method is used, then the specified number of clauses is required. Use of this method is totally independent of specifying that any specific clauses are required (or prohibited). This number will only be compared against the number of matching optional clauses. EXPERT NOTE: Using this method may force collecting docs in order, regardless of whether setAllowDocsOutOfOrder(true) has been called.
ToStringOverloaded. Prints a user-readable version of this query.
ToString (inherited from Query)Overloaded. Prints a query to a string.
Weight (inherited from Query)Expert: Constructs and initializes a Weight for a top-level query.

Protected Instance Methods

Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

Protected Internal Instance Fields

minNrShouldMatch 

Protected Internal Instance Methods

CreateWeight 

See Also

BooleanQuery Class | Lucene.Net.Search Namespace