| java.lang.Object org.apache.lucene.search.highlight.QueryTermExtractor
QueryTermExtractor | final public class QueryTermExtractor (Code) | | 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.
|
getIdfWeightedTerms | final public static WeightedTerm[] getIdfWeightedTerms(Query query, IndexReader reader, String fieldName)(Code) | | Extracts all terms texts of a given Query into an array of WeightedTerms
Parameters: query - Query to extract term texts from Parameters: 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 Parameters: fieldName - the field on which Inverse Document Frequency (IDF) calculations are based an array of the terms used in a query, plus their weights. |
getTerms | final public static WeightedTerm[] getTerms(Query query)(Code) | | Extracts all terms texts of a given Query into an array of WeightedTerms
Parameters: query - Query to extract term texts from an array of the terms used in a query, plus their weights. |
getTerms | final public static WeightedTerm[] getTerms(Query query, boolean prohibited, String fieldName)(Code) | | Extracts all terms texts of a given Query into an array of WeightedTerms
Parameters: query - Query to extract term texts from Parameters: prohibited - true to extract "prohibited" terms, too Parameters: fieldName - The fieldName used to filter query terms an array of the terms used in a query, plus their weights. |
getTerms | final public static WeightedTerm[] getTerms(Query query, boolean prohibited)(Code) | | Extracts all terms texts of a given Query into an array of WeightedTerms
Parameters: query - Query to extract term texts from Parameters: prohibited - true to extract "prohibited" terms, too an array of the terms used in a query, plus their weights. |
|
|