Class QueryTermExtractor
Utility class used to extract the terms used in a query, plus any weights.
This class will not find terms for
Inheritance
Namespace: Lucene.Net.Search.Highlight
Assembly: Lucene.Net.Highlighter.dll
Syntax
public static class QueryTermExtractor : object
Methods
| Improve this Doc View SourceGetIdfWeightedTerms(Query, IndexReader, String)
Extracts all terms texts of a given
Declaration
public static WeightedTerm[] GetIdfWeightedTerms(Query query, IndexReader reader, string fieldName)
Parameters
Type | Name | Description |
---|---|---|
Query | query | |
IndexReader | reader | used to compute IDF which can be used to a) score selected fragments better b) use graded highlights eg chaning intensity of font color |
System.String | fieldName | the field on which Inverse Document Frequency (IDF) calculations are based |
Returns
Type | Description |
---|---|
WeightedTerm[] | an array of the terms used in a query, plus their weights. |
GetTerms(Query)
Extracts all terms texts of a given
Declaration
public static WeightedTerm[] GetTerms(Query query)
Parameters
Type | Name | Description |
---|---|---|
Query | query |
Returns
Type | Description |
---|---|
WeightedTerm[] | an array of the terms used in a query, plus their weights. |
GetTerms(Query, Boolean)
Extracts all terms texts of a given
Declaration
public static WeightedTerm[] GetTerms(Query query, bool prohibited)
Parameters
Type | Name | Description |
---|---|---|
Query | query | |
System.Boolean | prohibited |
|
Returns
Type | Description |
---|---|
WeightedTerm[] | an array of the terms used in a query, plus their weights. |
GetTerms(Query, Boolean, String)
Extracts all terms texts of a given
Declaration
public static WeightedTerm[] GetTerms(Query query, bool prohibited, string fieldName)
Parameters
Type | Name | Description |
---|---|---|
Query | query | |
System.Boolean | prohibited |
|
System.String | fieldName | The fieldName used to filter query terms |
Returns
Type | Description |
---|---|
WeightedTerm[] | an array of the terms used in a query, plus their weights. |