Package org.apache.solr.ltr.feature
Class FieldValueFeature.FieldValueFeatureWeight
- java.lang.Object
-
- org.apache.lucene.search.Weight
-
- org.apache.solr.ltr.feature.Feature.FeatureWeight
-
- org.apache.solr.ltr.feature.FieldValueFeature.FieldValueFeatureWeight
-
- All Implemented Interfaces:
org.apache.lucene.search.SegmentCacheable
- Enclosing class:
- FieldValueFeature
public class FieldValueFeature.FieldValueFeatureWeight extends Feature.FeatureWeight
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
FieldValueFeature.FieldValueFeatureWeight.DefaultValueFieldValueFeatureScorer
A FeatureScorer that always returns the default value.class
FieldValueFeature.FieldValueFeatureWeight.FieldValueFeatureScorer
A FeatureScorer that reads the stored value for a fieldclass
FieldValueFeature.FieldValueFeatureWeight.NumericDocValuesFieldValueFeatureScorer
A FeatureScorer that reads the numeric docValues for a fieldclass
FieldValueFeature.FieldValueFeatureWeight.SortedDocValuesFieldValueFeatureScorer
A FeatureScorer that reads the sorted docValues for a field-
Nested classes/interfaces inherited from class org.apache.solr.ltr.feature.Feature.FeatureWeight
Feature.FeatureWeight.FeatureScorer, Feature.FeatureWeight.FilterFeatureScorer, Feature.FeatureWeight.ValueFeatureScorer
-
-
Field Summary
-
Fields inherited from class org.apache.solr.ltr.feature.Feature.FeatureWeight
efi, macroExpander, originalQuery, request, searcher
-
-
Constructor Summary
Constructors Constructor Description FieldValueFeatureWeight(org.apache.lucene.search.IndexSearcher searcher, SolrQueryRequest request, org.apache.lucene.search.Query originalQuery, Map<String,String[]> efi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
readNumericDocValuesDate(long val)
Override this method in sub classes that wish to use not an absolute time but an interval such as document age or remaining shelf life relative to a specific date or relative to now.Feature.FeatureWeight.FeatureScorer
scorer(org.apache.lucene.index.LeafReaderContext context)
Return a FeatureScorer that uses docValues or storedFields if no docValues are present-
Methods inherited from class org.apache.solr.ltr.feature.Feature.FeatureWeight
explain, getDefaultValue, getIndex, getName, isCacheable, toString
-
-
-
-
Constructor Detail
-
FieldValueFeatureWeight
public FieldValueFeatureWeight(org.apache.lucene.search.IndexSearcher searcher, SolrQueryRequest request, org.apache.lucene.search.Query originalQuery, Map<String,String[]> efi)
-
-
Method Detail
-
readNumericDocValuesDate
protected long readNumericDocValuesDate(long val)
Override this method in sub classes that wish to use not an absolute time but an interval such as document age or remaining shelf life relative to a specific date or relative to now.- Parameters:
val
- value of the field- Returns:
- value after transformation
-
scorer
public Feature.FeatureWeight.FeatureScorer scorer(org.apache.lucene.index.LeafReaderContext context) throws IOException
Return a FeatureScorer that uses docValues or storedFields if no docValues are present- Specified by:
scorer
in classFeature.FeatureWeight
- Parameters:
context
- the segment this FeatureScorer is working with- Returns:
- FeatureScorer for the current segment and field
- Throws:
IOException
- as defined by abstract class Feature
-
-