Language

EnterpriseGlobalSearchSession.Search(String, SearchSpec) Method

Definition

Retrieves documents from all AppSearch databases that the querying application has access to.

[Android.Runtime.Register("search", "(Ljava/lang/String;Landroid/app/appsearch/SearchSpec;)Landroid/app/appsearch/SearchResults;", "GetSearch_Ljava_lang_String_Landroid_app_appsearch_SearchSpec_Handler", ApiSince=35)]
public virtual Android.App.AppSearch.SearchResults Search(string queryExpression, Android.App.AppSearch.SearchSpec searchSpec);
[<Android.Runtime.Register("search", "(Ljava/lang/String;Landroid/app/appsearch/SearchSpec;)Landroid/app/appsearch/SearchResults;", "GetSearch_Ljava_lang_String_Landroid_app_appsearch_SearchSpec_Handler", ApiSince=35)>]
abstract member Search : string * Android.App.AppSearch.SearchSpec -> Android.App.AppSearch.SearchResults
override this.Search : string * Android.App.AppSearch.SearchSpec -> Android.App.AppSearch.SearchResults

Parameters

queryExpression
String

query string to search. This value cannot be null.

searchSpec
SearchSpec

spec for setting document filters, adding projection, setting term match type, etc. This value cannot be null.

Returns

a SearchResults object for retrieved matched documents. This value cannot be null.

Attributes

Remarks

Retrieves documents from all AppSearch databases that the querying application has access to. Applications can be granted access to documents by specifying SetSchemaRequest.Builder.setSchemaTypeVisibilityForPackage when building a schema. Document access can also be granted to system UIs by specifying SetSchemaRequest.Builder.setSchemaTypeDisplayedBySystem when building a schema. See AppSearchSession.search for a detailed explanation on forming a query string. This method is lightweight. The heavy work will be done in SearchResults.getNextPage.

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

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