the search speed and latency will be slow.
After your initial setup, you should go ahead and tune
the numLists parameter using the above guidance.
Parameters
num_lists – This integer is the number of clusters that the
inverted file (IVF) index uses to group the vector data.
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
dimensions – Number of dimensions for vector similarity.
The maximum number of supported dimensions is 2000
similarity – Similarity metric to use with the IVF index.
Possible options are:
CosmosDBSimilarityType.COS (cosine distance),
CosmosDBSimilarityType.L2 (Euclidean distance), and
CosmosDBSimilarityType.IP (inner product).
Returns
An object describing the created index
delete(ids: Optional[List[str]] = None, **kwargs: Any) → Optional[bool][source]¶
Delete by vector ID or other criteria.
Parameters
ids – List of ids to delete.
**kwargs – Other keyword arguments that subclasses might use.
Returns
True if deletion is successful,
False otherwise, None if not implemented.
Return type
Optional[bool]
delete_document_by_id(document_id: Optional[str] = None) → None[source]¶
Removes a Specific Document by Id
Parameters
document_id – The document identifier
delete_index() → None[source]¶
Deletes the index specified during instance construction if it exists
classmethod from_connection_string(connection_string: str, namespace: str, embedding: Embeddings, **kwargs: Any) → AzureCosmosDBVectorSearch[source]¶