你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

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

List<String> getVectorIndexShardKeys()

Gets the vector indexing shard keys

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

CosmosVectorIndexSpec setVectorIndexShardKeys(List<String> vectorIndexShardKeys)

Sets the vector indexing shard keys

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

getVectorIndexShardKeys

public List<String> getVectorIndexShardKeys()

Gets the vector indexing shard keys

Returns:

vectorIndexShardKeys the list of string containing the shard keys used for partitioning the vector indexes. This applies to index types diskANN and quantizedFlat. The maximum allowed size for this array is currently limited to 1 - that is, there is only one allowed path.

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

setVectorIndexShardKeys

public CosmosVectorIndexSpec setVectorIndexShardKeys(List<String> vectorIndexShardKeys)

Sets the vector indexing shard keys

Parameters:

vectorIndexShardKeys - vectorIndexShardKeys the list of string containing the shard keys used for partitioning the vector indexes. This applies to index types diskANN and quantizedFlat. The maximum allowed size for this array is currently limited to 1 - that is, there is only one allowed path.

Returns:

CosmosVectorIndexSpec

Applies to