Table of Contents

Method WithExcludedStoredFields

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

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.

public CreateAutoEmbeddingVectorSearchIndexModel<TDocument> WithExcludedStoredFields(params FieldDefinition<TDocument>[] excludedStoredFields)

Parameters

excludedStoredFields FieldDefinition<TDocument>[]

The fields to exclude from being stored.

Returns

CreateAutoEmbeddingVectorSearchIndexModel<TDocument>

A new model with the fields configured.

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.

public CreateAutoEmbeddingVectorSearchIndexModel<TDocument> WithExcludedStoredFields(params Expression<Func<TDocument, object>>[] excludedStoredFields)

Parameters

excludedStoredFields Expression<Func<TDocument, object>>[]

The fields to exclude from being stored.

Returns

CreateAutoEmbeddingVectorSearchIndexModel<TDocument>

A new model with the fields configured.