Class DecayFunctionBuilder.AbstractDistanceScoreFunction

    • Field Detail

      • offset

        protected final double offset
    • Constructor Detail

      • AbstractDistanceScoreFunction

        public AbstractDistanceScoreFunction​(double userSuppiedScale,
                                             double decay,
                                             double offset,
                                             DecayFunction func,
                                             MultiValueMode mode)
    • Method Detail

      • distance

        protected abstract NumericDoubleValues distance​(org.apache.lucene.index.LeafReaderContext context)
        This function computes the distance from a defined origin. Since the value of the document is read from the index, it cannot be guaranteed that the value actually exists. If it does not, we assume the user handles this case in the query and return 0.
      • getDistanceString

        protected abstract java.lang.String getDistanceString​(org.apache.lucene.index.LeafReaderContext ctx,
                                                              int docId)
      • getFieldName

        protected abstract java.lang.String getFieldName()