語言

AppSearchSession.Remove 方法

定義

多載

名稱 Description
Remove(RemoveByDocumentIdRequest, IExecutor, IBatchResultCallback)

透過資料庫中某個命名空間AppSearchSession中的文件 ID 移除GenericDocument物件。

Remove(String, SearchSpec, IExecutor, IConsumer)

透過查詢將 s 從索引中移除 GenericDocument。

Remove(RemoveByDocumentIdRequest, IExecutor, IBatchResultCallback)

透過資料庫中某個命名空間AppSearchSession中的文件 ID 移除GenericDocument物件。

[Android.Runtime.Register("remove", "(Landroid/app/appsearch/RemoveByDocumentIdRequest;Ljava/util/concurrent/Executor;Landroid/app/appsearch/BatchResultCallback;)V", "", ApiSince=31)]
public void Remove(Android.App.AppSearch.RemoveByDocumentIdRequest request, Java.Util.Concurrent.IExecutor executor, Android.App.AppSearch.IBatchResultCallback callback);
[<Android.Runtime.Register("remove", "(Landroid/app/appsearch/RemoveByDocumentIdRequest;Ljava/util/concurrent/Executor;Landroid/app/appsearch/BatchResultCallback;)V", "", ApiSince=31)>]
member this.Remove : Android.App.AppSearch.RemoveByDocumentIdRequest * Java.Util.Concurrent.IExecutor * Android.App.AppSearch.IBatchResultCallback -> unit

參數

request
RemoveByDocumentIdRequest

RemoveByDocumentIdRequest 在命名空間中,使用 ID 可從索引中移除。

executor
IExecutor

執行人,用以啟動回撥。

callback
IBatchResultCallback

回調以接收執行此操作的待處理結果。 回傳 AppSearchBatchResult 的鍵代表物件的 RemoveByDocumentIdRequest 輸入 ID。 這些數值要麼 null 是成功,要麼是失敗 AppSearchResult 。 找不到的 ID 會回傳 AppSearchResult 失敗,結果代碼為 AppSearchResult#RESULT_NOT_FOUND。 如果 AppSearch 服務發生意外內部錯誤, BatchResultCallback#onSystemError 將會以 Throwable..

屬性

備註

透過資料庫中某個命名空間AppSearchSession中的文件 ID 移除GenericDocument物件。

移除的文件將不再被查詢 #search 或 #getByDocumentId 電話。

一旦資料庫超過文件數量或位元組使用量門檻,移除的文件就會從磁碟中刪除。

Java 文件 android.app.appsearch.AppSearchSession.remove(android.app.appsearch.RemoveByDocumentIdRequest, java.util.concurrent.Executor, android.app.appsearch.BatchResultCallback<java.lang.String, java.lang.Void>)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Remove(String, SearchSpec, IExecutor, IConsumer)

透過查詢將 s 從索引中移除 GenericDocument。

[Android.Runtime.Register("remove", "(Ljava/lang/String;Landroid/app/appsearch/SearchSpec;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=31)]
public void Remove(string queryExpression, Android.App.AppSearch.SearchSpec searchSpec, Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer callback);
[<Android.Runtime.Register("remove", "(Ljava/lang/String;Landroid/app/appsearch/SearchSpec;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=31)>]
member this.Remove : string * Android.App.AppSearch.SearchSpec * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit

參數

queryExpression
String

查詢字串搜尋。

searchSpec
SearchSpec

包含 schemaTypes、命名空間與查詢表達式的規範會指示文件將如何被移除。 關於如何評分、排序、剪輯和結果的具體內容都會被忽略。

executor
IExecutor

執行人,用以啟動回撥。

callback
IConsumer

回撥以接收移除文件後產生的錯誤。 若操作成功,回調將以 null為 。

屬性

備註

透過查詢將 s 從索引中移除 GenericDocument。 文件若符合與 in given namespaces 和 schemaTypes(透過 SearchSpec.Builder#addFilterNamespaces 和 SearchSpec.Builder#addFilterSchemas設定)相符queryExpression,文件將被移除。

空字 queryExpression 與所有文件相符。

一組空的命名空間或 schemaTypes 與目前資料庫中的所有命名空間或 schemaTypes 相匹配。

Java 文件 android.app.appsearch.AppSearchSession.remove(java.lang.String, android.app.appsearch.SearchSpec, java.util.concurrent.Executor, java.util.function.Consumer<android.app.appsearch.AppSearchResult<java.lang.Void>>)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於