PayloadDecoder (Lucene 10.5.0 queries API)
Description: declaration: package: org.apache.lucene.queries.payloads, interface: PayloadDecoder

Package 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
  Modifier and Type
  Field
  Description
  `static final PayloadDecoder`
  `FLOAT_DECODER`
  A `PayloadDecoder` that interprets the bytes of a payload as a float

- ## Method Summary

  Modifier and Type
  Method
  Description
  `float`
  `computePayloadFactor(BytesRef payload)`
  Compute a float value for the given payload

- ## Field Details

  - ### FLOAT_DECODER

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

- ## Method Details

  - ### computePayloadFactor

    float computePayloadFactor(BytesRef payload)
    Compute a float value for the given payload