org.apache.lucene.queries.payloads

## Interface PayloadDecoder

    public interface PayloadDecoder

Defines a way of converting payloads to float values, for use by `PayloadScoreQuery`

### Field Summary

Fields
`static PayloadDecoder` `FLOAT_DECODER` A `PayloadDecoder` that interprets the bytes of a payload as a float

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
`float` `computePayloadFactor(BytesRef payload)` Compute a float value for the given payload
`default float` `computePayloadFactor(int docID, int startPosition, int endPosition, BytesRef payload)` Deprecated. Use `computePayloadFactor(BytesRef)` - doc and position can be taken into account in `PayloadFunction.currentScore(int, String, int, int, int, float, float)`

### Field Detail

#### FLOAT_DECODER

    static final PayloadDecoder FLOAT_DECODER

A `PayloadDecoder` that interprets the bytes of a payload as a float

### Method Detail

#### computePayloadFactor

    @Deprecated
    default float computePayloadFactor(int docID,
                                                   int startPosition,
                                                   int endPosition,
                                                   BytesRef payload)

Deprecated. Use `computePayloadFactor(BytesRef)` - doc and position can be taken into account in `PayloadFunction.currentScore(int, String, int, int, int, float, float)`
Compute a float value based on the doc, position and payload

#### computePayloadFactor

    float computePayloadFactor(BytesRef payload)

Compute a float value for the given payload