public class

SearchStats.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.appsearch.localstorage.stats.SearchStats.Builder

Overview

Builder for SearchStats

Summary

Constructors
publicBuilder(int visibilityScope, java.lang.String packageName)

Constructor

Methods
public SearchStatsbuild()

Constructs a new SearchStats from the contents of this SearchStats.Builder.

public SearchStats.BuildersetCurrentPageReturnedResultCount(int currentPageReturnedResultCount)

Sets the actual number of results returned in the current page.

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

Sets the database used by the session.

public SearchStats.BuildersetDocumentRetrievingLatencyMillis(int documentRetrievingLatencyMillis)

Sets time used to fetch the document protos.

public SearchStats.BuildersetFilteredNamespaceCount(int filteredNamespaceCount)

Sets number of namespaces filtered.

public SearchStats.BuildersetFilteredSchemaTypeCount(int filteredSchemaTypeCount)

Sets number of schema types filtered.

public SearchStats.BuildersetIsFirstPage(boolean nativeIsFirstPage)

Sets whether the function call is querying the first page.

public SearchStats.BuildersetNativeLatencyMillis(int nativeLatencyMillis)

Sets overall time used for the native function calls.

public SearchStats.BuildersetParseQueryLatencyMillis(int parseQueryLatencyMillis)

Sets time used to parse the query, including 2 parts: tokenizing and transforming tokens into an iterator tree.

public SearchStats.BuildersetQueryLength(int queryLength)

Sets length of the search string.

public SearchStats.BuildersetRankingLatencyMillis(int rankingLatencyMillis)

Sets time used to rank the scored results.

public SearchStats.BuildersetRankingStrategy(int rankingStrategy)

Sets strategy of scoring and ranking.

public SearchStats.BuildersetRequestedPageSize(int requestedPageSize)

Sets the requested number of results in one page.

public SearchStats.BuildersetResultWithSnippetsCount(int resultWithSnippetsCount)

Sets how many snippets are calculated.

public SearchStats.BuildersetRewriteSearchResultLatencyMillis(int rewriteSearchResultLatencyMillis)

Sets time used to rewrite the search results.

public SearchStats.BuildersetRewriteSearchSpecLatencyMillis(int rewriteSearchSpecLatencyMillis)

Sets time used to rewrite the search spec.

public SearchStats.BuildersetScoredDocumentCount(int scoredDocumentCount)

Sets number of documents scored.

public SearchStats.BuildersetScoringLatencyMillis(int scoringLatencyMillis)

Sets time used to score the raw results.

public SearchStats.BuildersetStatusCode(int statusCode)

Sets the status of the search.

public SearchStats.BuildersetTermCount(int termCount)

Sets number of terms in the search string.

public SearchStats.BuildersetTotalLatencyMillis(int totalLatencyMillis)

Sets total latency for the search.

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

Constructors

public Builder(int visibilityScope, java.lang.String packageName)

Constructor

Parameters:

visibilityScope: scope for the corresponding search.
packageName: name of the calling package.

Methods

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

Sets the database used by the session.

public SearchStats.Builder setStatusCode(int statusCode)

Sets the status of the search.

public SearchStats.Builder setTotalLatencyMillis(int totalLatencyMillis)

Sets total latency for the search.

public SearchStats.Builder setRewriteSearchSpecLatencyMillis(int rewriteSearchSpecLatencyMillis)

Sets time used to rewrite the search spec.

public SearchStats.Builder setRewriteSearchResultLatencyMillis(int rewriteSearchResultLatencyMillis)

Sets time used to rewrite the search results.

public SearchStats.Builder setNativeLatencyMillis(int nativeLatencyMillis)

Sets overall time used for the native function calls.

public SearchStats.Builder setTermCount(int termCount)

Sets number of terms in the search string.

public SearchStats.Builder setQueryLength(int queryLength)

Sets length of the search string.

public SearchStats.Builder setFilteredNamespaceCount(int filteredNamespaceCount)

Sets number of namespaces filtered.

public SearchStats.Builder setFilteredSchemaTypeCount(int filteredSchemaTypeCount)

Sets number of schema types filtered.

public SearchStats.Builder setRequestedPageSize(int requestedPageSize)

Sets the requested number of results in one page.

public SearchStats.Builder setCurrentPageReturnedResultCount(int currentPageReturnedResultCount)

Sets the actual number of results returned in the current page.

public SearchStats.Builder setIsFirstPage(boolean nativeIsFirstPage)

Sets whether the function call is querying the first page. If it's not, Icing will fetch the results from cache so that some steps may be skipped.

public SearchStats.Builder setParseQueryLatencyMillis(int parseQueryLatencyMillis)

Sets time used to parse the query, including 2 parts: tokenizing and transforming tokens into an iterator tree.

public SearchStats.Builder setRankingStrategy(int rankingStrategy)

Sets strategy of scoring and ranking.

public SearchStats.Builder setScoredDocumentCount(int scoredDocumentCount)

Sets number of documents scored.

public SearchStats.Builder setScoringLatencyMillis(int scoringLatencyMillis)

Sets time used to score the raw results.

public SearchStats.Builder setRankingLatencyMillis(int rankingLatencyMillis)

Sets time used to rank the scored results.

public SearchStats.Builder setDocumentRetrievingLatencyMillis(int documentRetrievingLatencyMillis)

Sets time used to fetch the document protos.

public SearchStats.Builder setResultWithSnippetsCount(int resultWithSnippetsCount)

Sets how many snippets are calculated.

public SearchStats build()

Constructs a new SearchStats from the contents of this SearchStats.Builder.