Package com.sap.ai.sdk.grounding.model

# Class MergeStrategyScoreReuse

java.lang.Object
com.sap.ai.sdk.grounding.model.MergeStrategyScoreReuse

All Implemented Interfaces:
  `RetrievalSearchInputPostProcessingInnerStrategy`, `Strategy`

public class MergeStrategyScoreReuse extends Object implements RetrievalSearchInputPostProcessingInnerStrategy, Strategy
The MergeStrategyScoreReuse merges the given PerFilterSearchResult instances according to the scores returned by the downstream retrieval process. It is important that the scores are comparable, meaning they should come from the same embedding model or reranker model.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `MergeStrategyScoreReuse()`
  Default constructor for MergeStrategyScoreReuse.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static MergeStrategyScoreReuse`
  `create()`
  Create a new `MergeStrategyScoreReuse` instance.
  `boolean`
  `equals(Object o)`
  `Object`
  `getCustomField(String name)`
  Deprecated.
  Use `toMap()` instead.
  `Set<String>`
  `getCustomFieldNames()`
  Get the names of the unrecognizable properties of the `MergeStrategyScoreReuse`.
  `MergeStrategyType`
  `getType()`
  Get type
  `int`
  `hashCode()`
  `void`
  `setCustomField(String customFieldName, Object customFieldValue)`
  Set an unrecognizable property of this `MergeStrategyScoreReuse` instance.
  `void`
  `setType(MergeStrategyType type)`
  Set the type of this `MergeStrategyScoreReuse` instance.
  `Map<String,Object>`
  `toMap()`
  Get the value of all properties of this `MergeStrategyScoreReuse` instance including unrecognized properties.
  `String`
  `toString()`
  `MergeStrategyScoreReuse`
  `type(MergeStrategyType type)`
  Set the type of this `MergeStrategyScoreReuse` instance and return the same instance.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### MergeStrategyScoreReuse

    protected MergeStrategyScoreReuse()
    Default constructor for MergeStrategyScoreReuse.

- ## Method Details

  - ### type

    @Nonnull public MergeStrategyScoreReuse type(@Nullable MergeStrategyType type)
    Set the type of this `MergeStrategyScoreReuse` instance and return the same instance.
    Parameters:
      `type` - The type of this `MergeStrategyScoreReuse`
    Returns:
      The same instance of this `MergeStrategyScoreReuse` class

  - ### getType

    @Nonnull public MergeStrategyType getType()
    Get type
    Returns:
      type The type of this `MergeStrategyScoreReuse` instance.

  - ### setType

    public void setType(@Nullable MergeStrategyType type)
    Set the type of this `MergeStrategyScoreReuse` instance.
    Parameters:
      `type` - The type of this `MergeStrategyScoreReuse`

  - ### getCustomFieldNames

    @Nonnull public Set<String> getCustomFieldNames()
    Get the names of the unrecognizable properties of the `MergeStrategyScoreReuse`.
    Returns:
      The set of properties names

  - ### getCustomField

    @Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException
    Deprecated.
    Use `toMap()` instead.
    Get the value of an unrecognizable property of this `MergeStrategyScoreReuse` instance.
    Parameters:
      `name` - The name of the property
    Returns:
      The value of the property
    Throws:
      `NoSuchElementException` - If no property with the given name could be found.

  - ### toMap

    @Nonnull public Map<String,Object> toMap()
    Get the value of all properties of this `MergeStrategyScoreReuse` instance including unrecognized properties.
    Returns:
      The map of all properties

  - ### setCustomField

    public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue)
    Set an unrecognizable property of this `MergeStrategyScoreReuse` instance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
    Parameters:
      `customFieldName` - The name of the property
      `customFieldValue` - The value of the property

  - ### equals

    public boolean equals(@Nullable Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    @Nonnull public String toString()
    Overrides:
      `toString` in class `Object`

  - ### create

    public static MergeStrategyScoreReuse create()
    Create a new `MergeStrategyScoreReuse` instance. No arguments are required.