RequestOptions.IndexingDirective RequestOptions.IndexingDirective RequestOptions.IndexingDirective Property

Definition

Gets or sets the indexing directive (Include or Exclude) for the request in the Azure Cosmos DB service.

public Nullable<Microsoft.Azure.Documents.IndexingDirective> IndexingDirective { get; set; }
member this.IndexingDirective : Nullable<Microsoft.Azure.Documents.IndexingDirective> with get, set
Public Property IndexingDirective As Nullable(Of IndexingDirective)

Property Value

The indexing directive to use with a request.

Examples

The following example shows how to explicitly index a document in a collection with automatic indexing turned off.


client.CreateDocumentAsync(defaultCollection.SelfLink,
    new { id = "AndersenFamily", isRegistered = true },
    new RequestOptions { IndexingDirective = IndexingDirective.Include });

Applies to

See also