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
파일 보기 프로젝트 열기: synhershko/lucene.net 1 사용 예제들

공개 메소드들

메소드 설명
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