C# Класс 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
Наследование: Query
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BoostingQuery ( Query match, Query context, float boost ) : System
Equals ( Object obj ) : bool
GetHashCode ( ) : int
Rewrite ( IndexReader reader ) : Query
ToString ( String field ) : String

Описание методов

BoostingQuery() публичный Метод

public BoostingQuery ( Query match, Query context, float boost ) : System
match Query
context Query
boost float
Результат System

Equals() публичный Метод

public Equals ( Object obj ) : bool
obj Object
Результат bool

GetHashCode() публичный Метод

public GetHashCode ( ) : int
Результат int

Rewrite() публичный Метод

public Rewrite ( IndexReader reader ) : Query
reader Lucene.Net.Index.IndexReader
Результат Query

ToString() публичный Метод

public ToString ( String field ) : String
field String
Результат String