org.apache.solr.ltr.feature

Class FieldLengthFeature



  • public class FieldLengthFeature
    extends Feature
    This feature returns the length of a field (in terms) for the current document. Example configuration:
    {
      "name":  "titleLength",
      "class": "org.apache.solr.ltr.feature.FieldLengthFeature",
      "params": {
          "field": "title"
      }
    }
    Note: since this feature relies on norms values that are stored in a single byte the value of the feature could have a lightly different value. (see also ClassicSimilarity)