C# Class Rubber.DSL.Query.BoolQueryBuilder

A Query that matches documents matching boolean combinations of other queries.
Inheritance: IQueryBuilder
Show file Open project: stephenpope/Rubber

Public Methods

Method Description
Boost ( float boost ) : BoolQueryBuilder

Sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.

DisableCoord ( bool disableCoord ) : BoolQueryBuilder

Disables Similarity#coord(int,int) in scoring. Defaults to false.

HasClauses ( ) : bool

Return true if the query being built has no clause yet.

MinimumNumberShouldMatch ( int minimumNumberShouldMatch ) : BoolQueryBuilder

Specifies a minimum number of the optional (should) boolean clauses 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. minimumNumberShouldMatch the number of optional clauses that must match

Must ( IQueryBuilder queryBuilder ) : BoolQueryBuilder

Adds a query that must appear in the matching documents.

MustNot ( IQueryBuilder queryBuilder ) : BoolQueryBuilder

Adds a query that must not appear in the matching documents.

Should ( IQueryBuilder queryBuilder ) : BoolQueryBuilder

Adds a query that should appear in the matching documents. For a boolean query with no MUST clauses one or more SHOULD clauses must match a document for the BooleanQuery to match.

ToJsonObject ( ) : object
ToString ( ) : string

Private Methods

Method Description
ArrayToObject ( string field, IList array, object contentObject ) : object

Method Details

Boost() public method

Sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided.
public Boost ( float boost ) : BoolQueryBuilder
boost float
return BoolQueryBuilder

DisableCoord() public method

Disables Similarity#coord(int,int) in scoring. Defaults to false.
public DisableCoord ( bool disableCoord ) : BoolQueryBuilder
disableCoord bool
return BoolQueryBuilder

HasClauses() public method

Return true if the query being built has no clause yet.
public HasClauses ( ) : bool
return bool

MinimumNumberShouldMatch() public method

Specifies a minimum number of the optional (should) boolean clauses 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. minimumNumberShouldMatch the number of optional clauses that must match
public MinimumNumberShouldMatch ( int minimumNumberShouldMatch ) : BoolQueryBuilder
minimumNumberShouldMatch int
return BoolQueryBuilder

Must() public method

Adds a query that must appear in the matching documents.
public Must ( IQueryBuilder queryBuilder ) : BoolQueryBuilder
queryBuilder IQueryBuilder
return BoolQueryBuilder

MustNot() public method

Adds a query that must not appear in the matching documents.
public MustNot ( IQueryBuilder queryBuilder ) : BoolQueryBuilder
queryBuilder IQueryBuilder
return BoolQueryBuilder

Should() public method

Adds a query that should appear in the matching documents. For a boolean query with no MUST clauses one or more SHOULD clauses must match a document for the BooleanQuery to match.
public Should ( IQueryBuilder queryBuilder ) : BoolQueryBuilder
queryBuilder IQueryBuilder
return BoolQueryBuilder

ToJsonObject() public method

public ToJsonObject ( ) : object
return object

ToString() public method

public ToString ( ) : string
return string