Language

EnterpriseGlobalSearchSession.GetByDocumentId Method

Definition

Retrieves GenericDocument documents, belonging to the specified package name and database name and identified by the namespace and ids in the request, from the GlobalSearchSession database.

[Android.Runtime.Register("getByDocumentId", "(Ljava/lang/String;Ljava/lang/String;Landroid/app/appsearch/GetByDocumentIdRequest;Ljava/util/concurrent/Executor;Landroid/app/appsearch/BatchResultCallback;)V", "GetGetByDocumentId_Ljava_lang_String_Ljava_lang_String_Landroid_app_appsearch_GetByDocumentIdRequest_Ljava_util_concurrent_Executor_Landroid_app_appsearch_BatchResultCallback_Handler", ApiSince=35)]
public virtual void GetByDocumentId(string packageName, string databaseName, Android.App.AppSearch.GetByDocumentIdRequest request, Java.Util.Concurrent.IExecutor executor, Android.App.AppSearch.IBatchResultCallback callback);
[<Android.Runtime.Register("getByDocumentId", "(Ljava/lang/String;Ljava/lang/String;Landroid/app/appsearch/GetByDocumentIdRequest;Ljava/util/concurrent/Executor;Landroid/app/appsearch/BatchResultCallback;)V", "GetGetByDocumentId_Ljava_lang_String_Ljava_lang_String_Landroid_app_appsearch_GetByDocumentIdRequest_Ljava_util_concurrent_Executor_Landroid_app_appsearch_BatchResultCallback_Handler", ApiSince=35)>]
abstract member GetByDocumentId : string * string * Android.App.AppSearch.GetByDocumentIdRequest * Java.Util.Concurrent.IExecutor * Android.App.AppSearch.IBatchResultCallback -> unit
override this.GetByDocumentId : string * string * Android.App.AppSearch.GetByDocumentIdRequest * Java.Util.Concurrent.IExecutor * Android.App.AppSearch.IBatchResultCallback -> unit

Parameters

packageName
String

the name of the package to get from. This value cannot be null.

databaseName
String

the name of the database to get from. This value cannot be null.

request
GetByDocumentIdRequest

a request containing a namespace and IDs to get documents for. This value cannot be null.

executor
IExecutor

Executor on which to invoke the callback. This value cannot be null. Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use Context.getMainExecutor(). Otherwise, provide an Executor that dispatches to an appropriate thread.

callback
IBatchResultCallback

Callback to receive the pending result of performing this operation. The keys of the returned AppSearchBatchResult are the input IDs. The values are the returned GenericDocument s on success, or a failed AppSearchResult otherwise. IDs that are not found will return a failed AppSearchResult with a result code of AppSearchResult.RESULT_NOT_FOUND. If an unexpected internal error occurs in the AppSearch service, BatchResultCallback.onSystemError will be invoked with a Throwable. This value cannot be null.

Attributes

Remarks

Retrieves GenericDocument documents, belonging to the specified package name and database name and identified by the namespace and ids in the request, from the GlobalSearchSession database. If the package or database doesn't exist or if the calling package doesn't have access, the gets will be handled as failures in an AppSearchBatchResult object in the callback.

Android reference for android.app.appsearch.EnterpriseGlobalSearchSession.getByDocumentId.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to