public abstract class Feature.FeatureWeight extends Weight
| Modifier and Type | Class and Description |
|---|---|
class |
Feature.FeatureWeight.FeatureScorer
A 'recipe' for computing a feature
|
class |
Feature.FeatureWeight.FilterFeatureScorer
A
FeatureScorer that contains a Scorer,
which it delegates to where appropriate. |
class |
Feature.FeatureWeight.ValueFeatureScorer
Default FeatureScorer class that returns the score passed in.
|
Weight.DefaultBulkScorer| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String[]> |
efi |
protected MacroExpander |
macroExpander |
protected Query |
originalQuery |
protected SolrQueryRequest |
request |
protected IndexSearcher |
searcher |
parentQuery| Constructor and Description |
|---|
FeatureWeight(Query q,
IndexSearcher searcher,
SolrQueryRequest request,
Query originalQuery,
Map<String,String[]> efi)
Initialize a feature without the normalizer from the feature file.
|
| Modifier and Type | Method and Description |
|---|---|
Explanation |
explain(LeafReaderContext context,
int doc) |
void |
extractTerms(Set<Term> terms) |
float |
getDefaultValue() |
int |
getIndex() |
String |
getName() |
boolean |
isCacheable(LeafReaderContext ctx) |
abstract Feature.FeatureWeight.FeatureScorer |
scorer(LeafReaderContext context) |
String |
toString()
Used in the FeatureWeight's explain.
|
bulkScorer, getQuery, matches, scorerSupplierprotected final IndexSearcher searcher
protected final SolrQueryRequest request
protected final MacroExpander macroExpander
protected final Query originalQuery
public FeatureWeight(Query q, IndexSearcher searcher, SolrQueryRequest request, Query originalQuery, Map<String,String[]> efi)
q - Solr query associated with this FeatureWeightsearcher - Solr searcher available for features if they need thempublic String getName()
public int getIndex()
public float getDefaultValue()
public abstract Feature.FeatureWeight.FeatureScorer scorer(LeafReaderContext context) throws IOException
scorer in class WeightIOExceptionpublic boolean isCacheable(LeafReaderContext ctx)
public Explanation explain(LeafReaderContext context, int doc) throws IOException
explain in class WeightIOExceptionpublic String toString()
public void extractTerms(Set<Term> terms)
extractTerms in class WeightCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.