C# 클래스 Lucene.Net.Search.Highlight.QueryTermExtractor

Utility class used to extract the terms used in a query, plus any weights. This class will not find terms for MultiTermQuery, RangeQuery and PrefixQuery classes so the caller must pass a rewritten query (see Query.rewrite) to obtain a list of expanded terms.
파일 보기 프로젝트 열기: synhershko/lucene.net 1 사용 예제들

공개 메소드들

메소드 설명
GetIdfWeightedTerms ( Query query, IndexReader reader, string fieldName ) : Lucene.Net.Search.Highlight.WeightedTerm[]

Extracts all terms texts of a given Query into an array of WeightedTerms

GetTerms ( Query query ) : Lucene.Net.Search.Highlight.WeightedTerm[]

Extracts all terms texts of a given Query into an array of WeightedTerms

GetTerms ( Query query, bool prohibited ) : Lucene.Net.Search.Highlight.WeightedTerm[]

Extracts all terms texts of a given Query into an array of WeightedTerms

GetTerms ( Query query, bool prohibited, string fieldName ) : Lucene.Net.Search.Highlight.WeightedTerm[]

Extracts all terms texts of a given Query into an array of WeightedTerms

비공개 메소드들

메소드 설명
GetTerms ( Query query, HashSet terms, bool prohibited, string fieldName ) : void
GetTermsFromBooleanQuery ( BooleanQuery query, HashSet terms, bool prohibited, string fieldName ) : void

extractTerms is currently the only query-independent means of introspecting queries but it only reveals a list of terms for that query - not the boosts each individual term in that query may or may not have. "Container" queries such as BooleanQuery should be unwrapped to get at the boost info held in each child element. Some discussion around this topic here: http://www.gossamer-threads.com/lists/lucene/java-dev/34208?search_string=introspection;#34208 Unfortunately there seemed to be limited interest in requiring all Query objects to implement something common which would allow access to child queries so what follows here are query-specific implementations for accessing embedded query elements.

GetTermsFromFilteredQuery ( FilteredQuery query, HashSet terms, bool prohibited, string fieldName ) : void

메소드 상세

GetIdfWeightedTerms() 공개 정적인 메소드

Extracts all terms texts of a given Query into an array of WeightedTerms
public static GetIdfWeightedTerms ( Query query, IndexReader reader, string fieldName ) : Lucene.Net.Search.Highlight.WeightedTerm[]
query Query Query to extract term texts from
reader Lucene.Net.Index.IndexReader used to compute IDF which can be used to a) score selected fragments better /// b) use graded highlights eg chaning intensity of font color
fieldName string the field on which Inverse Document Frequency (IDF) calculations are based
리턴 Lucene.Net.Search.Highlight.WeightedTerm[]

GetTerms() 공개 정적인 메소드

Extracts all terms texts of a given Query into an array of WeightedTerms
public static GetTerms ( Query query ) : Lucene.Net.Search.Highlight.WeightedTerm[]
query Query Query to extract term texts from ///
리턴 Lucene.Net.Search.Highlight.WeightedTerm[]

GetTerms() 공개 정적인 메소드

Extracts all terms texts of a given Query into an array of WeightedTerms
public static GetTerms ( Query query, bool prohibited ) : Lucene.Net.Search.Highlight.WeightedTerm[]
query Query Query to extract term texts from ///
prohibited bool true to extract "prohibited" terms, too ///
리턴 Lucene.Net.Search.Highlight.WeightedTerm[]

GetTerms() 공개 정적인 메소드

Extracts all terms texts of a given Query into an array of WeightedTerms
public static GetTerms ( Query query, bool prohibited, string fieldName ) : Lucene.Net.Search.Highlight.WeightedTerm[]
query Query Query to extract term texts from
prohibited bool true to extract "prohibited" terms, too
fieldName string The fieldName used to filter query terms
리턴 Lucene.Net.Search.Highlight.WeightedTerm[]