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.

Feedback

Was this page helpful?