Freigeben über


RequestOptions.IndexingDirective Eigenschaft

Definition

Ruft die Indizierungsdirektive (Include oder Exclude) für die Anforderung im Azure Cosmos DB-Dienst ab oder legt sie fest.

public 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)

Eigenschaftswert

Die Indizierungsdirektive, die mit einer Anforderung verwendet werden soll.

Beispiele

Das folgende Beispiel zeigt, wie ein Dokument in einer Auflistung explizit indiziert wird, wobei die automatische Indizierung deaktiviert ist.

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

Gilt für:

Weitere Informationen