SearchAction.Builder


@Document.BuilderProducer
class SearchAction.Builder : SearchAction.BuilderBase


Builder for SearchAction.

Summary

Public constructors

Builder(searchAction: SearchAction)

Constructor for SearchAction.Builder with all the existing values.

Builder(namespace: String, id: String, actionTimestampMillis: Long)

Constructor for SearchAction.Builder.

Inherited functions

From androidx.appsearch.usagereporting.SearchAction.BuilderBase
SearchAction

Builds a SearchAction.

T
setFetchedResultCount(fetchedResultCount: Int)

Sets total number of results fetched from AppSearch by the client in this SearchAction.

T
setQuery(query: String?)

Sets the user-entered search input (without any operators or rewriting).

From androidx.appsearch.usagereporting.TakenAction.BuilderBase
TakenAction

For AppSearch annotation processor requirement only.

T
setDocumentTtlMillis(documentTtlMillis: Long)

Sets the time-to-live (TTL) of the TakenAction document as a duration in milliseconds.

Public constructors

Builder

Added in 1.1.0
Builder(searchAction: SearchAction)

Constructor for SearchAction.Builder with all the existing values.

Builder

Added in 1.1.0
Builder(namespace: String, id: String, actionTimestampMillis: Long)

Constructor for SearchAction.Builder.

Parameters
namespace: String

Namespace for the Document. See Document.Namespace.

id: String

Unique identifier for the Document. See Document.Id.

actionTimestampMillis: Long

The timestamp when the user took the action, in milliseconds since Unix epoch.