Table of Contents

Method WithExcludedStoredFields

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

WithExcludedStoredFields(params FieldDefinition<TDocument>[])

Creates a new CreateVectorSearchIndexModel<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 CreateVectorSearchIndexModel<TDocument> WithExcludedStoredFields(params FieldDefinition<TDocument>[] excludedStoredFields)

Parameters

excludedStoredFields FieldDefinition<TDocument>[]

The fields to exclude from being stored.

Returns

CreateVectorSearchIndexModel<TDocument>

A new model with the fields configured.

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

Creates a new CreateVectorSearchIndexModel<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 CreateVectorSearchIndexModel<TDocument> WithExcludedStoredFields(params Expression<Func<TDocument, object>>[] excludedStoredFields)

Parameters

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

The fields to exclude from being stored.

Returns

CreateVectorSearchIndexModel<TDocument>

A new model with the fields configured.