AppSearchManager.SearchContext.Builder

  • AppSearchManager.SearchContext.Builder is used to create AppSearchManager.SearchContext objects.

  • A new builder is created using the constructor Builder(String databaseName).

  • The build() method is used to create an AppSearchManager.SearchContext instance from the builder.

  • Database names cannot contain '/'.

public static final class AppSearchManager.SearchContext.Builder extends Object

Builder for AppSearchManager.SearchContext objects.

Public Constructor Summary

Public Method Summary

AppSearchManager.SearchContext

Inherited Method Summary

Public Constructors

public Builder (String databaseName)

Creates a new AppSearchManager.SearchContext.Builder.

AppSearchClient will create or open a database under the given name.

Databases with different names are fully separate with distinct types, namespaces, and data.

Database name cannot contain '/'.

Parameters
databaseName The name of the database.
Throws
IllegalArgumentException if the databaseName contains '/'.

Public Methods