CosmosIndexBuilderExtensions.ForVectors Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ForVectors(IndexBuilder, Nullable<VectorIndexType>) |
Configures the index as a vector index with the given vector index type, such as "flat", "diskANN", or "quantizedFlat". See Vector Search in Azure Cosmos DB for NoSQL for more information. |
ForVectors(IConventionIndexBuilder, Nullable<VectorIndexType>, Boolean) |
Configures whether the index as a vector index with the given vector index type, such as "flat", "diskANN", or "quantizedFlat". See Vector Search in Azure Cosmos DB for NoSQL for more information. |
ForVectors<TEntity>(IndexBuilder<TEntity>, Nullable<VectorIndexType>) |
Configures whether the index as a vector index with the given vector index type, such as "flat", "diskANN", or "quantizedFlat". See Vector Search in Azure Cosmos DB for NoSQL for more information. |
ForVectors(IndexBuilder, Nullable<VectorIndexType>)
Configures the index as a vector index with the given vector index type, such as "flat", "diskANN", or "quantizedFlat". See Vector Search in Azure Cosmos DB for NoSQL for more information.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder ForVectors (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder indexBuilder, Microsoft.Azure.Cosmos.VectorIndexType? indexType);
static member ForVectors : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder * Nullable<Microsoft.Azure.Cosmos.VectorIndexType> -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder
<Extension()>
Public Function ForVectors (indexBuilder As IndexBuilder, indexType As Nullable(Of VectorIndexType)) As IndexBuilder
Parameters
- indexBuilder
- IndexBuilder
The builder for the index being configured.
- indexType
- Nullable<VectorIndexType>
The type of vector index to create.
Returns
A builder to further configure the index.
Remarks
See Modeling entity types and relationships, and Accessing Azure Cosmos DB with EF Core for more information and examples.
Applies to
ForVectors(IConventionIndexBuilder, Nullable<VectorIndexType>, Boolean)
Configures whether the index as a vector index with the given vector index type, such as "flat", "diskANN", or "quantizedFlat". See Vector Search in Azure Cosmos DB for NoSQL for more information.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder? ForVectors (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder indexBuilder, Microsoft.Azure.Cosmos.VectorIndexType? indexType, bool fromDataAnnotation = false);
static member ForVectors : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder * Nullable<Microsoft.Azure.Cosmos.VectorIndexType> * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionIndexBuilder
<Extension()>
Public Function ForVectors (indexBuilder As IConventionIndexBuilder, indexType As Nullable(Of VectorIndexType), Optional fromDataAnnotation As Boolean = false) As IConventionIndexBuilder
Parameters
- indexBuilder
- IConventionIndexBuilder
The builder for the index being configured.
- indexType
- Nullable<VectorIndexType>
The type of vector index to create.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
The same builder instance if the configuration was applied,
null
otherwise.
Remarks
See Modeling entity types and relationships, and Accessing Azure Cosmos DB with EF Core for more information and examples.
Applies to
ForVectors<TEntity>(IndexBuilder<TEntity>, Nullable<VectorIndexType>)
Configures whether the index as a vector index with the given vector index type, such as "flat", "diskANN", or "quantizedFlat". See Vector Search in Azure Cosmos DB for NoSQL for more information.
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> ForVectors<TEntity> (this Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<TEntity> indexBuilder, Microsoft.Azure.Cosmos.VectorIndexType? indexType);
static member ForVectors : Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity> * Nullable<Microsoft.Azure.Cosmos.VectorIndexType> -> Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder<'Entity>
<Extension()>
Public Function ForVectors(Of TEntity) (indexBuilder As IndexBuilder(Of TEntity), indexType As Nullable(Of VectorIndexType)) As IndexBuilder(Of TEntity)
Type Parameters
- TEntity
Parameters
- indexBuilder
- IndexBuilder<TEntity>
The builder for the index being configured.
- indexType
- Nullable<VectorIndexType>
The type of vector index to create.
Returns
A builder to further configure the index.
Remarks
See Modeling entity types and relationships, and Accessing Azure Cosmos DB with EF Core for more information and examples.