DataSource.DocumentDb Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
Use CosmosDb instead.
Creates a new DataSource to connect to a DocumentDb database.
[System.Obsolete("Use CosmosDb instead.")]
public static Microsoft.Azure.Search.Models.DataSource DocumentDb (string name, string documentDbConnectionString, string collectionName, string query = default, bool useChangeDetection = true, Microsoft.Azure.Search.Models.DataDeletionDetectionPolicy deletionDetectionPolicy = default, string description = default);
[<System.Obsolete("Use CosmosDb instead.")>]
static member DocumentDb : string * string * string * string * bool * Microsoft.Azure.Search.Models.DataDeletionDetectionPolicy * string -> Microsoft.Azure.Search.Models.DataSource
Public Shared Function DocumentDb (name As String, documentDbConnectionString As String, collectionName As String, Optional query As String = Nothing, Optional useChangeDetection As Boolean = true, Optional deletionDetectionPolicy As DataDeletionDetectionPolicy = Nothing, Optional description As String = Nothing) As DataSource
Parameters
- name
- String
The name of the datasource.
- documentDbConnectionString
- String
The connection string for the DocumentDb database. It must follow this format: "AccountName|AccountEndpoint=[your account name or endpoint];AccountKey=[your account key];Database=[your database name]"
- collectionName
- String
The name of the collection from which to read documents.
- query
- String
Optional. A query that is applied to the collection when reading documents.
- useChangeDetection
- Boolean
Optional. Indicates whether to use change detection when indexing. Default is true.
- deletionDetectionPolicy
- DataDeletionDetectionPolicy
Optional. The data deletion detection policy for the datasource.
- description
- String
Optional. Description of the datasource.
Returns
A new DataSource instance.
- Attributes
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應