Udostępnij przez


RescoringOptions Class

  • java.lang.Object
    • com.azure.search.documents.indexes.models.RescoringOptions

Implements

public final class RescoringOptions
implements JsonSerializable<RescoringOptions>

Contains the options for rescoring.

Constructor Summary

Constructor Description
RescoringOptions()

Creates an instance of RescoringOptions class.

Method Summary

Modifier and Type Method and Description
static RescoringOptions fromJson(JsonReader jsonReader)

Reads an instance of RescoringOptions from the JsonReader.

Double getDefaultOversampling()

Get the defaultOversampling property: Default oversampling factor.

VectorSearchCompressionRescoreStorageMethod getRescoreStorageMethod()

Get the rescoreStorageMethod property: Controls the storage method for original vectors.

Boolean isRescoringEnabled()

Get the rescoringEnabled property: If set to true, after the initial search on the compressed vectors, the similarity scores are recalculated using the full-precision vectors.

RescoringOptions setDefaultOversampling(Double defaultOversampling)

Set the defaultOversampling property: Default oversampling factor.

RescoringOptions setRescoreStorageMethod(VectorSearchCompressionRescoreStorageMethod rescoreStorageMethod)

Set the rescoreStorageMethod property: Controls the storage method for original vectors.

RescoringOptions setRescoringEnabled(Boolean rescoringEnabled)

Set the rescoringEnabled property: If set to true, after the initial search on the compressed vectors, the similarity scores are recalculated using the full-precision vectors.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

RescoringOptions

public RescoringOptions()

Creates an instance of RescoringOptions class.

Method Details

fromJson

public static RescoringOptions fromJson(JsonReader jsonReader)

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.

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.

getRescoreStorageMethod

public VectorSearchCompressionRescoreStorageMethod getRescoreStorageMethod()

Get the rescoreStorageMethod property: Controls the storage method for original vectors. This setting is immutable.

Returns:

the rescoreStorageMethod value.

isRescoringEnabled

public Boolean isRescoringEnabled()

Get the rescoringEnabled 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 rescoringEnabled 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.

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.

setRescoringEnabled

public RescoringOptions setRescoringEnabled(Boolean rescoringEnabled)

Set the rescoringEnabled 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:

rescoringEnabled - the rescoringEnabled value to set.

Returns:

the RescoringOptions object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to