Freigeben über


CosmosVectorIndexSpec Class

  • java.lang.Object
    • com.azure.cosmos.models.CosmosVectorIndexSpec

public final class CosmosVectorIndexSpec

Vector Indexes spec for Azure CosmosDB service.

Constructor Summary

Constructor Description
CosmosVectorIndexSpec()

Constructor

Method Summary

Modifier and Type Method and Description
Integer getIndexingSearchListSize()

Gets the indexing search list size

String getPath()

Gets path.

Integer getQuantizationSizeInBytes()

Gets the quantization byte size

String getType()

Gets the vector index type for the vector index

CosmosVectorIndexSpec setIndexingSearchListSize(Integer indexingSearchListSize)

Sets the indexing search list size

CosmosVectorIndexSpec setPath(String path)

Sets path.

CosmosVectorIndexSpec setQuantizationSizeInBytes(Integer quantizationByteSize)

Sets the quantization byte size

CosmosVectorIndexSpec setType(String type)

Sets the vector index type for the vector index

Methods inherited from java.lang.Object

Constructor Details

CosmosVectorIndexSpec

public CosmosVectorIndexSpec()

Constructor

Method Details

getIndexingSearchListSize

public Integer getIndexingSearchListSize()

Gets the indexing search list size

Returns:

indexingSearchListSize which represents the size of the candidate list of approximate neighbors stored while building the DiskANN index as part of the optimization processes. The allowed range for this parameter is between 25 and 500.

getPath

public String getPath()

Gets path.

Returns:

the path.

getQuantizationSizeInBytes

public Integer getQuantizationSizeInBytes()

Gets the quantization byte size

Returns:

quantizationByteSize the number of bytes used in product quantization of the vectors. A larger value may result in better recall for vector searches at the expense of latency. This applies to index types DiskANN and quantizedFlat. The allowed range for this parameter is between 1 and 3.

getType

public String getType()

Gets the vector index type for the vector index

Returns:

the vector index type

setIndexingSearchListSize

public CosmosVectorIndexSpec setIndexingSearchListSize(Integer indexingSearchListSize)

Sets the indexing search list size

Parameters:

indexingSearchListSize - indexingSearchListSize which represents the size of the candidate list of approximate neighbors stored while building the DiskANN index as part of the optimization processes. The allowed range for this parameter is between 25 and 500.

Returns:

CosmosVectorIndexSpec

setPath

public CosmosVectorIndexSpec setPath(String path)

Sets path.

Parameters:

path - the path.

Returns:

the SpatialSpec.

setQuantizationSizeInBytes

public CosmosVectorIndexSpec setQuantizationSizeInBytes(Integer quantizationByteSize)

Sets the quantization byte size

Parameters:

quantizationByteSize - the number of bytes used in product quantization of the vectors. A larger value may result in better recall for vector searches at the expense of latency. This applies to index types DiskANN and quantizedFlat. The allowed range for this parameter is between 1 and min(Dimensions, 512). The default value would be 64.

Returns:

CosmosVectorIndexSpec

setType

public CosmosVectorIndexSpec setType(String type)

Sets the vector index type for the vector index

Parameters:

type - the vector index type

Returns:

the VectorIndexSpec

Applies to