public final class

SearchIntentStats.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.localstorage.stats.SearchIntentStats.Builder

Overview

Builder for SearchIntentStats

Summary

Constructors
publicBuilder(SearchIntentStats searchIntentStats)

Constructor the SearchIntentStats.Builder from an existing SearchIntentStats.

publicBuilder(java.lang.String packageName)

Constructor for the SearchIntentStats.Builder.

Methods
public SearchIntentStats.BuilderaddClicksStats(ClickStats clicksStats[])

Adds one or more ClickStats objects to this search intent.

public SearchIntentStats.BuilderaddClicksStats(java.util.Collection<ClickStats> clicksStats)

Adds a collection of ClickStats objects to this search intent.

public SearchIntentStatsbuild()

Builds a new SearchIntentStats from the SearchIntentStats.Builder.

public SearchIntentStats.BuildersetCurrQuery(java.lang.String currQuery)

Sets the raw query string of this (current) search intent.

public SearchIntentStats.BuildersetDatabase(java.lang.String database)

Sets calling database name.

public SearchIntentStats.BuildersetNumResultsFetched(int numResultsFetched)

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

public SearchIntentStats.BuildersetPrevQuery(java.lang.String prevQuery)

Sets the raw query string of the previous search intent.

public SearchIntentStats.BuildersetQueryCorrectionType(int queryCorrectionType)

Sets the correction type of the query in this search intent compared with the previous search intent.

public SearchIntentStats.BuildersetTimestampMillis(long timestampMillis)

Sets the search intent timestamp in milliseconds since Unix epoch.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder(java.lang.String packageName)

Constructor for the SearchIntentStats.Builder.

public Builder(SearchIntentStats searchIntentStats)

Constructor the SearchIntentStats.Builder from an existing SearchIntentStats.

Methods

public SearchIntentStats.Builder setDatabase(java.lang.String database)

Sets calling database name.

For global search, database name will be null.

public SearchIntentStats.Builder setPrevQuery(java.lang.String prevQuery)

Sets the raw query string of the previous search intent.

public SearchIntentStats.Builder setCurrQuery(java.lang.String currQuery)

Sets the raw query string of this (current) search intent.

public SearchIntentStats.Builder setTimestampMillis(long timestampMillis)

Sets the search intent timestamp in milliseconds since Unix epoch.

public SearchIntentStats.Builder setNumResultsFetched(int numResultsFetched)

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

public SearchIntentStats.Builder setQueryCorrectionType(int queryCorrectionType)

Sets the correction type of the query in this search intent compared with the previous search intent.

public SearchIntentStats.Builder addClicksStats(ClickStats clicksStats[])

Adds one or more ClickStats objects to this search intent.

public SearchIntentStats.Builder addClicksStats(java.util.Collection<ClickStats> clicksStats)

Adds a collection of ClickStats objects to this search intent.

public SearchIntentStats build()

Builds a new SearchIntentStats from the SearchIntentStats.Builder.