你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

SearchIndexerClient class

用于执行管理(创建、更新、列出/删除)索引器、数据源 & 技能集的作的类。

构造函数

SearchIndexerClient(string, KeyCredential | TokenCredential, SearchIndexerClientOptions)

创建 SearchIndexerClient 的实例。

示例用法:

import { SearchIndexerClient, AzureKeyCredential } from "@azure/search-documents";

const indexerClient = new SearchIndexerClient("<endpoint>", new AzureKeyCredential("<apiKey>"));

属性

apiVersion

与服务通信时要使用的 API 版本。

endpoint

搜索服务的终结点

pipeline

对用于原始请求的内部 HTTP 管道的引用

serviceVersion

与服务通信时要使用的 API 版本。

方法

createDataSourceConnection(SearchIndexerDataSourceConnection, OperationOptions)

在搜索服务中创建新的 DataSource。

createIndexer(SearchIndexer, OperationOptions)

在搜索服务中创建新的索引器。

createOrUpdateDataSourceConnection(SearchIndexerDataSourceConnection, CreateOrUpdateDataSourceConnectionOptions)

创建新的数据源或修改现有数据源。

createOrUpdateIndexer(SearchIndexer, CreateOrUpdateIndexerOptions)

创建新的索引器或修改现有索引器。

createOrUpdateSkillset(SearchIndexerSkillset, CreateOrUpdateSkillsetOptions)

创建新的技能集或修改现有技能集。

createSkillset(SearchIndexerSkillset, OperationOptions)

在搜索服务中创建新的技能集。

deleteDataSourceConnection(string | SearchIndexerDataSourceConnection, DeleteDataSourceConnectionOptions)

删除现有数据源。

deleteIndexer(string | SearchIndexer, DeleteIndexerOptions)

删除现有索引器。

deleteSkillset(string | SearchIndexerSkillset, DeleteSkillsetOptions)

删除现有技能集。

getDataSourceConnection(string, OperationOptions)

检索有关 DataSource 的信息

getIndexer(string, OperationOptions)

检索有关索引器的信息。

getIndexerStatus(string, OperationOptions)

返回索引器的当前状态和执行历史记录。

getSkillset(string, OperationOptions)

检索有关技能集的信息。

listDataSourceConnections(ResourceListingOptions)

检索服务中现有数据源的列表。

listDataSourceConnectionsNames(ResourceListingOptions)

检索服务中现有数据源的名称列表。

listIndexers(ResourceListingOptions)

检索服务中现有索引器的列表。

listIndexersNames(ResourceListingOptions)

检索服务中现有索引器的名称列表。

listSkillsets(ResourceListingOptions)

检索服务中现有技能集的列表。

listSkillsetsNames(ResourceListingOptions)

检索服务中现有技能集的名称列表。

resetIndexer(string, OperationOptions)

重置与索引器关联的更改跟踪状态。

resyncIndexer(string, ResyncIndexerOptions)

从数据源重新同步选择性选项,以由索引器重新引入。

runIndexer(string, OperationOptions)

按需运行索引器。

构造函数详细信息

SearchIndexerClient(string, KeyCredential | TokenCredential, SearchIndexerClientOptions)

创建 SearchIndexerClient 的实例。

示例用法:

import { SearchIndexerClient, AzureKeyCredential } from "@azure/search-documents";

const indexerClient = new SearchIndexerClient("<endpoint>", new AzureKeyCredential("<apiKey>"));
new SearchIndexerClient(endpoint: string, credential: KeyCredential | TokenCredential, options?: SearchIndexerClientOptions)

参数

endpoint

string

搜索服务的终结点

credential

KeyCredential | TokenCredential

用于对服务的请求进行身份验证。

options
SearchIndexerClientOptions

用于配置搜索客户端。

属性详细信息

apiVersion

警告

现已弃用此 API。

use {@Link serviceVersion} instead

与服务通信时要使用的 API 版本。

apiVersion: string

属性值

string

endpoint

搜索服务的终结点

endpoint: string

属性值

string

pipeline

对用于原始请求的内部 HTTP 管道的引用

pipeline: Pipeline

属性值

serviceVersion

与服务通信时要使用的 API 版本。

serviceVersion: string

属性值

string

方法详细信息

createDataSourceConnection(SearchIndexerDataSourceConnection, OperationOptions)

在搜索服务中创建新的 DataSource。

function createDataSourceConnection(dataSourceConnection: SearchIndexerDataSourceConnection, options?: OperationOptions): Promise<SearchIndexerDataSourceConnection>

参数

dataSourceConnection
SearchIndexerDataSourceConnection

在搜索服务中创建的 DataSource 定义。

options
OperationOptions

其他可选参数。

返回

createIndexer(SearchIndexer, OperationOptions)

在搜索服务中创建新的索引器。

function createIndexer(indexer: SearchIndexer, options?: OperationOptions): Promise<SearchIndexer>

参数

indexer
SearchIndexer

在搜索服务中创建的索引器定义。

options
OperationOptions

其他可选参数。

返回

Promise<SearchIndexer>

createOrUpdateDataSourceConnection(SearchIndexerDataSourceConnection, CreateOrUpdateDataSourceConnectionOptions)

创建新的数据源或修改现有数据源。

function createOrUpdateDataSourceConnection(dataSourceConnection: SearchIndexerDataSourceConnection, options?: CreateOrUpdateDataSourceConnectionOptions): Promise<SearchIndexerDataSourceConnection>

参数

dataSourceConnection
SearchIndexerDataSourceConnection

描述要创建/更新的数据源的信息。

options
@azure/search-documents.CreateOrUpdateDataSourceConnectionOptions

其他可选参数。

返回

createOrUpdateIndexer(SearchIndexer, CreateOrUpdateIndexerOptions)

创建新的索引器或修改现有索引器。

function createOrUpdateIndexer(indexer: SearchIndexer, options?: CreateOrUpdateIndexerOptions): Promise<SearchIndexer>

参数

indexer
SearchIndexer

描述要创建/更新的索引器的信息。

options
@azure/search-documents.CreateOrUpdateIndexerOptions

其他可选参数。

返回

Promise<SearchIndexer>

createOrUpdateSkillset(SearchIndexerSkillset, CreateOrUpdateSkillsetOptions)

创建新的技能集或修改现有技能集。

function createOrUpdateSkillset(skillset: SearchIndexerSkillset, options?: CreateOrUpdateSkillsetOptions): Promise<SearchIndexerSkillset>

参数

skillset
SearchIndexerSkillset

描述要创建的索引的信息。

options
CreateOrUpdateSkillsetOptions

其他可选参数。

返回

createSkillset(SearchIndexerSkillset, OperationOptions)

在搜索服务中创建新的技能集。

function createSkillset(skillset: SearchIndexerSkillset, options?: OperationOptions): Promise<SearchIndexerSkillset>

参数

skillset
SearchIndexerSkillset

包含在搜索服务中创建的一个或多个技能的技能集。

options
OperationOptions

其他可选参数。

返回

deleteDataSourceConnection(string | SearchIndexerDataSourceConnection, DeleteDataSourceConnectionOptions)

删除现有数据源。

function deleteDataSourceConnection(dataSourceConnection: string | SearchIndexerDataSourceConnection, options?: DeleteDataSourceConnectionOptions): Promise<void>

参数

dataSourceConnection

string | SearchIndexerDataSourceConnection

options
DeleteDataSourceConnectionOptions

其他可选参数。

返回

Promise<void>

deleteIndexer(string | SearchIndexer, DeleteIndexerOptions)

删除现有索引器。

function deleteIndexer(indexer: string | SearchIndexer, options?: DeleteIndexerOptions): Promise<void>

参数

indexer

string | SearchIndexer

要删除的索引器的索引器/名称。

options
DeleteIndexerOptions

其他可选参数。

返回

Promise<void>

deleteSkillset(string | SearchIndexerSkillset, DeleteSkillsetOptions)

删除现有技能集。

function deleteSkillset(skillset: string | SearchIndexerSkillset, options?: DeleteSkillsetOptions): Promise<void>

参数

skillset

string | SearchIndexerSkillset

要删除的技能集/技能集的名称。

options
DeleteSkillsetOptions

其他可选参数。

返回

Promise<void>

getDataSourceConnection(string, OperationOptions)

检索有关 DataSource 的信息

function getDataSourceConnection(dataSourceConnectionName: string, options?: OperationOptions): Promise<SearchIndexerDataSourceConnection>

参数

dataSourceConnectionName

string

options
OperationOptions

其他可选参数

返回

getIndexer(string, OperationOptions)

检索有关索引器的信息。

function getIndexer(indexerName: string, options?: OperationOptions): Promise<SearchIndexer>

参数

indexerName

string

索引器的名称。

options
OperationOptions

其他可选参数。

返回

Promise<SearchIndexer>

getIndexerStatus(string, OperationOptions)

返回索引器的当前状态和执行历史记录。

function getIndexerStatus(indexerName: string, options?: OperationOptions): Promise<SearchIndexerStatus>

参数

indexerName

string

索引器的名称。

options
OperationOptions

其他可选参数。

返回

getSkillset(string, OperationOptions)

检索有关技能集的信息。

function getSkillset(skillsetName: string, options?: OperationOptions): Promise<SearchIndexerSkillset>

参数

skillsetName

string

options
OperationOptions

其他可选参数。

返回

listDataSourceConnections(ResourceListingOptions)

检索服务中现有数据源的列表。

function listDataSourceConnections(options?: ResourceListingOptions): Promise<SearchIndexerDataSourceConnection[]>

参数

options
ResourceListingOptions

列表索引器作的选项。

返回

listDataSourceConnectionsNames(ResourceListingOptions)

检索服务中现有数据源的名称列表。

function listDataSourceConnectionsNames(options?: ResourceListingOptions): Promise<string[]>

参数

options
ResourceListingOptions

列表索引器作的选项。

返回

Promise<string[]>

listIndexers(ResourceListingOptions)

检索服务中现有索引器的列表。

function listIndexers(options?: ResourceListingOptions): Promise<SearchIndexer[]>

参数

options
ResourceListingOptions

列表索引器作的选项。

返回

Promise<SearchIndexer[]>

listIndexersNames(ResourceListingOptions)

检索服务中现有索引器的名称列表。

function listIndexersNames(options?: ResourceListingOptions): Promise<string[]>

参数

options
ResourceListingOptions

列表索引器作的选项。

返回

Promise<string[]>

listSkillsets(ResourceListingOptions)

检索服务中现有技能集的列表。

function listSkillsets(options?: ResourceListingOptions): Promise<SearchIndexerSkillset[]>

参数

options
ResourceListingOptions

列表技能集作的选项。

返回

listSkillsetsNames(ResourceListingOptions)

检索服务中现有技能集的名称列表。

function listSkillsetsNames(options?: ResourceListingOptions): Promise<string[]>

参数

options
ResourceListingOptions

列表技能集作的选项。

返回

Promise<string[]>

resetIndexer(string, OperationOptions)

重置与索引器关联的更改跟踪状态。

function resetIndexer(indexerName: string, options?: OperationOptions): Promise<void>

参数

indexerName

string

要重置的索引器的名称。

options
OperationOptions

其他可选参数。

返回

Promise<void>

resyncIndexer(string, ResyncIndexerOptions)

从数据源重新同步选择性选项,以由索引器重新引入。

function resyncIndexer(indexerName: string, options?: ResyncIndexerOptions): Promise<void>

参数

indexerName

string

要重新同步的索引器的名称。

options
ResyncIndexerOptions

额外的可选参数,包括要执行的重新同步选项。

返回

Promise<void>

runIndexer(string, OperationOptions)

按需运行索引器。

function runIndexer(indexerName: string, options?: OperationOptions): Promise<void>

参数

indexerName

string

要运行的索引器的名称。

options
OperationOptions

其他可选参数。

返回

Promise<void>