Share via


IndexDocumentsBatch class

類別,用來對索引使用多個檔執行批次作業。

建構函式

IndexDocumentsBatch<TModel>(IndexDocumentsAction<TModel>[])

屬性

actions

在此批次中採取的一組動作。

方法

delete(keyof TModel, string[])

刪除一組檔。

delete(TModel[])

刪除一組檔。

merge(TModel[])

更新索引中的一組檔。 如需合併運作方式的詳細資訊,請參閱 https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents

mergeOrUpload(TModel[])

更新索引中的一組檔,或在不存在時上傳檔。 如需合併運作方式的詳細資訊,請參閱 https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents

upload(TModel[])

將檔的陣列上傳至索引。

建構函式詳細資料

IndexDocumentsBatch<TModel>(IndexDocumentsAction<TModel>[])

new IndexDocumentsBatch(actions?: IndexDocumentsAction<TModel>[])

參數

actions

IndexDocumentsAction<TModel>[]

屬性詳細資料

actions

在此批次中採取的一組動作。

actions: IndexDocumentsAction<TModel>[]

屬性值

方法詳細資料

delete(keyof TModel, string[])

刪除一組檔。

function delete(keyName: keyof TModel, keyValues: string[])

參數

keyName

keyof TModel

索引中主鍵的名稱。

keyValues

string[]

要刪除的檔主鍵值。

delete(TModel[])

刪除一組檔。

function delete(documents: TModel[])

參數

documents

TModel[]

要刪除的檔。

merge(TModel[])

更新索引中的一組檔。 如需合併運作方式的詳細資訊,請參閱 https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents

function merge(documents: TModel[])

參數

documents

TModel[]

更新的檔。

mergeOrUpload(TModel[])

更新索引中的一組檔,或在不存在時上傳檔。 如需合併運作方式的詳細資訊,請參閱 https://docs.microsoft.com/en-us/rest/api/searchservice/AddUpdate-or-Delete-Documents

function mergeOrUpload(documents: TModel[])

參數

documents

TModel[]

新的/更新的檔。

upload(TModel[])

將檔的陣列上傳至索引。

function upload(documents: TModel[])

參數

documents

TModel[]

要上傳的檔。