Class Feature.FeatureWeight

    • Field Detail

      • searcher

        protected final searcher
      • originalQuery

        protected final originalQuery
    • Constructor Detail

      • FeatureWeight

        public FeatureWeight​( q,
                             SolrQueryRequest request,
                             Map<String,​String[]> efi)
        Initialize a feature without the normalizer from the feature file. This is called on initial construction since multiple models share the same features, but have different normalizers. A concrete model's feature is copied through featForNewModel().
        q - Solr query associated with this FeatureWeight
        searcher - Solr searcher available for features if they need them
    • Method Detail

      • getName

        public String getName()
      • getIndex

        public int getIndex()
      • getDefaultValue

        public float getDefaultValue()
      • isCacheable

        public boolean isCacheable​(org.apache.lucene.index.LeafReaderContext ctx)
      • explain

        public explain​(org.apache.lucene.index.LeafReaderContext context,
                                                            int doc)
                                                     throws IOException
        Specified by:
        explain in class
      • toString

        public String toString()
        Used in the FeatureWeight's explain. Each feature should implement this returning properties of the specific scorer useful for an explain. For example "MyCustomClassFeature [name=" + name + "myVariable:" + myVariable + "]"; If not provided, a default implementation will return basic feature properties, which might not include query time specific values.
        toString in class Object