public final class

SearchAction.Builder

extends androidx.appsearch.usagereporting.TakenAction.BuilderImpl<SearchAction.Builder>

 java.lang.Object

↳androidx.appsearch.usagereporting.TakenAction.BuilderImpl<SearchAction.Builder>

↳androidx.appsearch.usagereporting.SearchAction.Builder

Overview

Builder for SearchAction.

Summary

Fields
from androidx.appsearch.usagereporting.TakenAction.BuilderImpl<T>mActionTimestampMillis, mActionType, mDocumentTtlMillis, mId, mNamespace
Constructors
publicBuilder(SearchAction searchAction)

Constructor for SearchAction.Builder with all the existing values.

publicBuilder(java.lang.String namespace, java.lang.String id, long actionTimestampMillis)

Constructor for SearchAction.Builder.

Methods
public SearchActionbuild()

Builds a SearchAction.

public SearchAction.BuildersetFetchedResultCount(int fetchedResultCount)

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

public SearchAction.BuildersetQuery(java.lang.String query)

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

from androidx.appsearch.usagereporting.TakenAction.BuilderImpl<T>setDocumentTtlMillis
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(java.lang.String namespace, java.lang.String id, long actionTimestampMillis)

Constructor for SearchAction.Builder.

Parameters:

namespace: Namespace for the Document. See .
id: Unique identifier for the Document. See .
actionTimestampMillis: The timestamp when the user took the action, in milliseconds since Unix epoch.

public Builder(SearchAction searchAction)

Constructor for SearchAction.Builder with all the existing values.

Methods

public SearchAction.Builder setQuery(java.lang.String query)

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

public SearchAction.Builder setFetchedResultCount(int fetchedResultCount)

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

See also: SearchAction.getFetchedResultCount()

public SearchAction build()

Builds a SearchAction.