🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

milvus-logo
LFAI
< Docs
  • C#

CreateIndexAsync()

Creates an index.

Invocation

await collection.CreateIndexAsync(fieldName, indexType = null, metricType = null, indexName = null, extraParams = null, cancellationToken = default);

Parameters

ParameterDescriptionTypeRequired
fieldNameThe name of the field in the collection for which the index will be created.stringTrue
indexTypeThe type of the index to be created.IndexType?False
metricTypeMethod used to measure the distance between vectors during search.SimilarityMetricType?False
indexNameAn optional name for the index to be created.string?False
extraParamsExtra parameters specific to each index type; consult the documentation for your index type for more details.IDictionary<string, string>?False
cancellationTokenThe token to monitor for cancellation requests. The default value is CancellationToken.None.CancellationTokenFalse

Return

This method does not return any value.

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?