A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/android/reference/com/google/android/gms/appsearch/AppSearchClient below:

AppSearchClient | Google Play services

Client class for AppSearch. An instance of this class can be created using AppSearch to provide a connection to a single AppSearch database.

Public Methods public abstract Task<Void> close ()

Closes the AppSearchClient to persist all schema and document updates, additions, and deletes to disk.

public abstract Task<Set<String>> getNamespaces (String databaseName)

Retrieves the set of all namespaces in the target database with at least one document.

Parameters databaseName the name of the database all namespaces belong to. public abstract Task<StorageInfo> getStorageInfo (String databaseName)

Gets the storage info for the specified database.

This may take time proportional to the number of documents and may be inefficient to call repeatedly.

Parameters databaseName the name of the database. public abstract Task<Void> remove (String queryExpression, SearchSpec searchSpec, String databaseName) Parameters queryExpression Query String to search. searchSpec Spec containing schemaTypes, namespaces and query expression indicates how document will be removed. All specific about how to scoring, ordering, snippeting and resulting will be ignored. databaseName the name of the database this remove targets. public abstract Task<Void> reportUsage (ReportUsageRequest reportUsageRequest, String databaseName) Parameters reportUsageRequest The usage reporting request. databaseName the name of the database the reported documents belong to. public abstract SearchResults search (String queryExpression, SearchSpec searchSpec, String databaseName)

Retrieves documents from the specified database that match a given query string and type of search provided.

Query strings can be empty, contain one term with no operators, or contain multiple terms and operators.

For query strings that are empty, all documents that match the SearchSpec will be returned.

For query strings with a single term and no operators, documents that match the provided query string and SearchSpec will be returned.

The following operators are supported:

Additional search specifications, such as filtering by AppSearchSchema type or adding projection, can be set by calling the corresponding SearchSpec.Builder setter.

This method is lightweight. The heavy work will be done in SearchResults.getNextPage().

Parameters queryExpression query string to search. searchSpec spec for setting document filters, adding projection, setting term match type, etc. databaseName the name of the database retrieved documents belong to. public abstract Task<List<SearchSuggestionResult>> searchSuggestion (String suggestionQueryExpression, SearchSuggestionSpec searchSuggestionSpec, String databaseName)

Retrieves suggested Strings that could be used as queryExpression in search(String, SearchSpec, String) API.

The suggestionQueryExpression can contain one term with no operators, or contain multiple terms and operators. Operators will be considered as a normal term. Please see the operator examples below. The suggestionQueryExpression must end with a valid term, the suggestions are generated based on the last term. If the input suggestionQueryExpression doesn't have a valid token, AppSearch will return an empty result list. Please see the invalid examples below.

Example: if there are following documents with content stored in AppSearch.

Search suggestions with the single term suggestionQueryExpression "t", the suggested results are:

Search suggestions with the multiple term suggestionQueryExpression "org t", the suggested result will be "org term1" - The last token is completed by the suggested String.

Operators in search(String, SearchSpec, String) are supported.

NOTE: Exclusion and Grouped Terms in the last term is not supported.

example: "apple -f": This Api will throw an AppSearchException with AppSearchResult.RESULT_INVALID_ARGUMENT.

example: "apple (f)": This Api will return an empty results.

Invalid example: All these input suggestionQueryExpression don't have a valid last token, AppSearch will return an empty result list.

Parameters suggestionQueryExpression the non empty query string to search suggestions searchSuggestionSpec spec for setting document filters databaseName public abstract Task<SetSchemaResponse> setSchema (SetSchemaRequest setSchemaRequest, String databaseName)

Sets the schema that represents the organizational structure of data within the Google Play services AppSearch database.

Upon creating an AppSearchClient, setSchema(SetSchemaRequest, String) should be called. If the schema needs to be updated, or it has not been previously set, then the provided schema will be saved and persisted to disk. Otherwise, setSchema(SetSchemaRequest, String) is handled efficiently as a no-op call.

Parameters setSchemaRequest the schema to set or update the AppSearch database to. databaseName the name of the target database.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4