GetTerms() public static method

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 ///
return Lucene.Net.Search.Highlight.WeightedTerm[]
コード例 #1
0
 /// <param name="query">
 /// a Lucene query (ideally rewritten using <see cref="Query.Rewrite(IndexReader)"/> before
 /// being passed to this class and the searcher)
 /// </param>
 /// <param name="fieldName">the Field name which is used to match Query terms</param>
 public QueryTermScorer(Query query, string fieldName)
     : this(QueryTermExtractor.GetTerms(query, false, fieldName))
 {
 }
コード例 #2
0
 /// <param name="query">
 /// a Lucene query (ideally rewritten using <see cref="Query.Rewrite(IndexReader)"/> before
 /// being passed to this class and the searcher)
 /// </param>
 public QueryTermScorer(Query query)
     : this(QueryTermExtractor.GetTerms(query))
 {
 }