C# Class Lucene.Net.Search.BoostingQuery

The BoostingQuery class can be used to effectively demote results that match a given query. Unlike the "NOT" clause, this still selects documents that contain undesirable terms, but reduces their overall score:
 Query balancedQuery = new BoostingQuery(positiveQuery, negativeQuery, 0.01f); 
In this scenario the positiveQuery contains the mandatory, desirable criteria which is used to select all matching documents, and the negativeQuery contains the undesirable elements which are simply used to lessen the scores. Documents that match the negativeQuery have their score multiplied by the supplied "boost" parameter, so this should be less than 1 to achieve a demoting effect This code was originally made available here: mailing list and is documented here: Documentation
Inheritance: Query
Afficher le fichier Open project: synhershko/lucene.net Class Usage Examples

Méthodes publiques

Méthode Description
BoostingQuery ( Query match, Query context, float boost ) : System
Equals ( Object obj ) : bool
GetHashCode ( ) : int
Rewrite ( IndexReader reader ) : Query
ToString ( String field ) : String

Method Details

BoostingQuery() public méthode

public BoostingQuery ( Query match, Query context, float boost ) : System
match Query
context Query
boost float
Résultat System

Equals() public méthode

public Equals ( Object obj ) : bool
obj Object
Résultat bool

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

Rewrite() public méthode

public Rewrite ( IndexReader reader ) : Query
reader Lucene.Net.Index.IndexReader
Résultat Query

ToString() public méthode

public ToString ( String field ) : String
field String
Résultat String