Class CreateAutoEmbeddingVectorSearchIndexModel<TDocument>
Defines a vector index model for an auto-embedding vector index using strongly-typed C# APIs.
public sealed class CreateAutoEmbeddingVectorSearchIndexModel<TDocument> : CreateVectorSearchIndexModelBase<TDocument>
Type Parameters
TDocument
- Inheritance
-
CreateVectorSearchIndexModelBase<TDocument>CreateAutoEmbeddingVectorSearchIndexModel<TDocument>
- Inherited Members
Constructors
- CreateAutoEmbeddingVectorSearchIndexModel(FieldDefinition<TDocument>, string, string, params FieldDefinition<TDocument>[])
Initializes a new instance of the CreateAutoEmbeddingVectorSearchIndexModel<TDocument> for a vector index that will automatically create embeddings from a given field in the document. The embedding model to use must be passed to this constructor.
- CreateAutoEmbeddingVectorSearchIndexModel(Expression<Func<TDocument, object>>, string, string, params Expression<Func<TDocument, object>>[])
Initializes a new instance of the CreateAutoEmbeddingVectorSearchIndexModel<TDocument> for a vector index that will automatically create embeddings from a given field in the document. The embedding model to use must be passed to this constructor.
Properties
- AutoEmbeddingModelName
The name of the embedding model to use, such as "voyage-4", "voyage-4-large", etc.
- Modality
Indicates the type of data that will be embedded for an auto-embedding index.
- Similarity
The VectorSimilarity to use to search for top K-nearest neighbors. For auto-embedding indexes, this defaults to DotProduct when Quantization is None or Scalar, and Euclidean when Quantization is Binary or BinaryNoRescore.
Methods
- WithExcludedStoredFields(params FieldDefinition<TDocument>[])
Creates a new CreateAutoEmbeddingVectorSearchIndexModel<TDocument> with the given fields configured to be excluded from being stored in the index. This is typically used to exclude vector fields from being stored when other fields should be stored.
- WithExcludedStoredFields(params Expression<Func<TDocument, object>>[])
Creates a new CreateAutoEmbeddingVectorSearchIndexModel<TDocument> with the given fields configured to be excluded from being stored in the index. This is typically used to exclude vector fields from being stored when other fields should be stored.
- WithIncludedStoredFields(params FieldDefinition<TDocument>[])
Creates a new CreateAutoEmbeddingVectorSearchIndexModel<TDocument> with the given fields configured to be stored in the index. Note that storing full documents might significantly impact performance during indexing and querying. Explicitly storing vector fields is not recommended.
- WithIncludedStoredFields(params Expression<Func<TDocument, object>>[])
Creates a new CreateAutoEmbeddingVectorSearchIndexModel<TDocument> with the given fields configured to be stored in the index. Note that storing full documents might significantly impact performance during indexing and querying. Explicitly storing vector fields is not recommended.