Class FieldValueFeature.FieldValueFeatureWeight

  • All Implemented Interfaces:
    org.apache.lucene.search.SegmentCacheable
    Enclosing class:
    FieldValueFeature

    public class FieldValueFeature.FieldValueFeatureWeight
    extends Feature.FeatureWeight
    • 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 class Feature.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