Class RescoringOptions

java.lang.Object
com.azure.search.documents.indexes.models.RescoringOptions
All Implemented Interfaces:
com.azure.json.JsonSerializable<RescoringOptions>

public final class RescoringOptions extends Object implements com.azure.json.JsonSerializable<RescoringOptions>
Contains the options for rescoring.
  • Constructor Details

    • RescoringOptions

      public RescoringOptions()
      Creates an instance of RescoringOptions class.
  • Method Details

    • isEnableRescoring

      public Boolean isEnableRescoring()
      Get the enableRescoring property: If set to true, after the initial search on the compressed vectors, the similarity scores are recalculated using the full-precision vectors. This will improve recall at the expense of latency.
      Returns:
      the enableRescoring value.
    • setEnableRescoring

      public RescoringOptions setEnableRescoring(Boolean enableRescoring)
      Set the enableRescoring property: If set to true, after the initial search on the compressed vectors, the similarity scores are recalculated using the full-precision vectors. This will improve recall at the expense of latency.
      Parameters:
      enableRescoring - the enableRescoring value to set.
      Returns:
      the RescoringOptions object itself.
    • getDefaultOversampling

      public Double getDefaultOversampling()
      Get the defaultOversampling property: Default oversampling factor. Oversampling retrieves a greater set of potential documents to offset the resolution loss due to quantization. This increases the set of results that will be rescored on full-precision vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when 'enableRescoring' is true. Higher values improve recall at the expense of latency.
      Returns:
      the defaultOversampling value.
    • setDefaultOversampling

      public RescoringOptions setDefaultOversampling(Double defaultOversampling)
      Set the defaultOversampling property: Default oversampling factor. Oversampling retrieves a greater set of potential documents to offset the resolution loss due to quantization. This increases the set of results that will be rescored on full-precision vectors. Minimum value is 1, meaning no oversampling (1x). This parameter can only be set when 'enableRescoring' is true. Higher values improve recall at the expense of latency.
      Parameters:
      defaultOversampling - the defaultOversampling value to set.
      Returns:
      the RescoringOptions object itself.
    • getRescoreStorageMethod

      public VectorSearchCompressionRescoreStorageMethod getRescoreStorageMethod()
      Get the rescoreStorageMethod property: Controls the storage method for original vectors. This setting is immutable.
      Returns:
      the rescoreStorageMethod value.
    • setRescoreStorageMethod

      public RescoringOptions setRescoreStorageMethod(VectorSearchCompressionRescoreStorageMethod rescoreStorageMethod)
      Set the rescoreStorageMethod property: Controls the storage method for original vectors. This setting is immutable.
      Parameters:
      rescoreStorageMethod - the rescoreStorageMethod value to set.
      Returns:
      the RescoringOptions object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<RescoringOptions>
      Throws:
      IOException
    • fromJson

      public static RescoringOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RescoringOptions from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RescoringOptions if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the RescoringOptions.