Partager via


AzureCosmosDBMongoDBConfig Class

Definition

Azure Cosmos Mongo vCore configuration. More information here: https://learn.microsoft.com/azure/cosmos-db/mongodb/vcore/vector-search.

public class AzureCosmosDBMongoDBConfig
type AzureCosmosDBMongoDBConfig = class
Public Class AzureCosmosDBMongoDBConfig
Inheritance
AzureCosmosDBMongoDBConfig

Remarks

Initialize the AzureCosmosDBMongoDBConfig with default values.

Constructors

AzureCosmosDBMongoDBConfig(Int32)

Azure Cosmos Mongo vCore configuration. More information here: https://learn.microsoft.com/azure/cosmos-db/mongodb/vcore/vector-search.

Properties

ApplicationName

Application name for the client for tracking and logging

Dimensions

Number of dimensions for vector similarity. The maximum number of supported dimensions is 2000.

EfConstruction

The size of the dynamic candidate list for constructing the graph (64 by default, minimum value is 4, maximum value is 1000). Higher ef_construction will result in better index quality and higher accuracy, but it will also increase the time required to build the index. EfConstruction has to be at least 2 * m

EfSearch

The size of the dynamic candidate list for search (40 by default). A higher value provides better recall at the cost of speed.

IndexName

Index name for the Mongo vCore DB. Default is "default_index".

Kind

Type of vector index to create. Possible options are: - vector-ivf (default) - vector-hnsw: available as a preview feature only, to enable visit https://learn.microsoft.com/azure/azure-resource-manager/management/preview-features

NumberOfConnections

The max number of connections per layer (16 by default, minimum value is 2, maximum value is 100). Higher m is suitable for datasets with high dimensionality and/or high accuracy requirements.

NumLists

This integer is the number of clusters that the inverted file (IVF) index uses to group the vector data. Default is 1. We recommend that numLists is set to documentCount/1000 for up to 1 million documents and to sqrt(documentCount) for more than 1 million documents. Using a numLists value of 1 is akin to performing brute-force search, which has limited performance.

Similarity

Similarity metric to use with the IVF index. Possible options are: - COS (cosine distance, default), - L2 (Euclidean distance), and - IP (inner product).

Applies to