Class ModelResultFilter

java.lang.Object
org.opensearch.ml.common.output.model.ModelResultFilter
All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable

public class ModelResultFilter extends Object implements org.opensearch.core.common.io.stream.Writeable
This class is to filter model results.
  • Field Details

    • RETURN_BYTES_FIELD

      public static final String RETURN_BYTES_FIELD
      See Also:
    • RETURN_NUMBER_FIELD

      public static final String RETURN_NUMBER_FIELD
      See Also:
    • TARGET_RESPONSE_FIELD

      public static final String TARGET_RESPONSE_FIELD
      See Also:
    • TARGET_RESPONSE_POSITIONS_FIELD

      public static final String TARGET_RESPONSE_POSITIONS_FIELD
      See Also:
    • returnBytes

      protected final boolean returnBytes
    • returnNumber

      protected final boolean returnNumber
    • targetResponse

      protected final List<String> targetResponse
    • targetResponsePositions

      protected final List<Integer> targetResponsePositions
  • Constructor Details

    • ModelResultFilter

      public ModelResultFilter(boolean returnBytes, boolean returnNumber, List<String> targetResponse, List<Integer> targetResponsePositions)
    • ModelResultFilter

      public ModelResultFilter(org.opensearch.core.common.io.stream.StreamInput streamInput) throws IOException
      Throws:
      IOException
  • Method Details

    • writeTo

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput streamOutput) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Throws:
      IOException
    • parse

      public static ModelResultFilter parse(org.opensearch.core.xcontent.XContentParser parser) throws IOException
      Throws:
      IOException
    • builder

    • isReturnBytes

      public boolean isReturnBytes()
    • isReturnNumber

      public boolean isReturnNumber()
    • getTargetResponse

      public List<String> getTargetResponse()
    • getTargetResponsePositions

      public List<Integer> getTargetResponsePositions()