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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RescoringOptionsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RescoringOptions from the JsonReader.Get the defaultOversampling property: Default oversampling factor.Get the rescoreStorageMethod property: Controls the storage method for original vectors.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.setDefaultOversampling(Double defaultOversampling) Set the defaultOversampling property: Default oversampling factor.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.setRescoreStorageMethod(VectorSearchCompressionRescoreStorageMethod rescoreStorageMethod) Set the rescoreStorageMethod property: Controls the storage method for original vectors.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
RescoringOptions
public RescoringOptions()Creates an instance of RescoringOptions class.
-
-
Method Details
-
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
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
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
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
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<RescoringOptions>- Throws:
IOException
-
fromJson
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.
-