VectorSearchCompression Class

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

Implements

public class VectorSearchCompression
implements JsonSerializable<VectorSearchCompression>

Contains configuration options specific to the compression method used during indexing or querying.

Constructor Summary

Constructor Description
VectorSearchCompression(String compressionName)

Creates an instance of VectorSearchCompression class.

Method Summary

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

Reads an instance of VectorSearchCompression from the JsonReader.

String getCompressionName()

Get the compressionName property: The name to associate with this particular configuration.

VectorSearchCompressionKind getKind()

Get the kind property: Type of VectorSearchCompression.

RescoringOptions getRescoringOptions()

Get the rescoringOptions property: Contains the options for rescoring.

Integer getTruncationDimension()

Get the truncationDimension property: The number of dimensions to truncate the vectors to.

VectorSearchCompression setRescoringOptions(RescoringOptions rescoringOptions)

Set the rescoringOptions property: Contains the options for rescoring.

VectorSearchCompression setTruncationDimension(Integer truncationDimension)

Set the truncationDimension property: The number of dimensions to truncate the vectors to.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

VectorSearchCompression

public VectorSearchCompression(String compressionName)

Creates an instance of VectorSearchCompression class.

Parameters:

compressionName - the compressionName value to set.

Method Details

fromJson

public static VectorSearchCompression fromJson(JsonReader jsonReader)

Reads an instance of VectorSearchCompression from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of VectorSearchCompression if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getCompressionName

public String getCompressionName()

Get the compressionName property: The name to associate with this particular configuration.

Returns:

the compressionName value.

getKind

public VectorSearchCompressionKind getKind()

Get the kind property: Type of VectorSearchCompression.

Returns:

the kind value.

getRescoringOptions

public RescoringOptions getRescoringOptions()

Get the rescoringOptions property: Contains the options for rescoring.

Returns:

the rescoringOptions value.

getTruncationDimension

public Integer getTruncationDimension()

Get the truncationDimension property: The number of dimensions to truncate the vectors to. Truncating the vectors reduces the size of the vectors and the amount of data that needs to be transferred during search. This can save storage cost and improve search performance at the expense of recall. It should be only used for embeddings trained with Matryoshka Representation Learning (MRL) such as OpenAI text-embedding-3-large (small). The default value is null, which means no truncation.

Returns:

the truncationDimension value.

setRescoringOptions

public VectorSearchCompression setRescoringOptions(RescoringOptions rescoringOptions)

Set the rescoringOptions property: Contains the options for rescoring.

Parameters:

rescoringOptions - the rescoringOptions value to set.

Returns:

the VectorSearchCompression object itself.

setTruncationDimension

public VectorSearchCompression setTruncationDimension(Integer truncationDimension)

Set the truncationDimension property: The number of dimensions to truncate the vectors to. Truncating the vectors reduces the size of the vectors and the amount of data that needs to be transferred during search. This can save storage cost and improve search performance at the expense of recall. It should be only used for embeddings trained with Matryoshka Representation Learning (MRL) such as OpenAI text-embedding-3-large (small). The default value is null, which means no truncation.

Parameters:

truncationDimension - the truncationDimension value to set.

Returns:

the VectorSearchCompression object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to