Class PayloadScoreQuery


  • public class PayloadScoreQuery
    extends SpanQuery
    A Query class that uses a PayloadFunction to modify the score of a wrapped SpanQuery
    • Constructor Detail

      • PayloadScoreQuery

        public PayloadScoreQuery​(SpanQuery wrappedQuery,
                                 PayloadFunction function,
                                 PayloadDecoder decoder,
                                 boolean includeSpanScore)
        Creates a new PayloadScoreQuery
        Parameters:
        wrappedQuery - the query to wrap
        function - a PayloadFunction to use to modify the scores
        decoder - a PayloadDecoder to convert payloads into float values
        includeSpanScore - include both span score and payload score in the scoring algorithm
      • PayloadScoreQuery

        public PayloadScoreQuery​(SpanQuery wrappedQuery,
                                 PayloadFunction function,
                                 PayloadDecoder decoder)
        Creates a new PayloadScoreQuery that includes the underlying span scores
        Parameters:
        wrappedQuery - the query to wrap
        function - a PayloadFunction to use to modify the scores