This class represents the specification logic for AppSearch. It can be used to set the type of search, like prefix or exact only or apply filters to search for a specific schema type only etc.
Nested Class Summary Constant Summary Inherited Constant Summary From interface android.os.Parcelable int CONTENTS_FILE_DESCRIPTOR int PARCELABLE_WRITE_RETURN_VALUE Field Summary Public Method Summary String List<String> List<String> Map<String, List<String>> List<String> JoinSpec getJoinSpec()
Returns specification on which documents need to be joined.
int int getOrder()
Returns the order of returned search results (descending or ascending).
Map<String, List<PropertyPath>> getProjectionPaths()
Returns a map from schema type to property paths to be used for projection.
Map<String, List<String>> getProjections()
Returns a map from schema type to property paths to be used for projection.
Map<String, Map<PropertyPath, Double>> Map<String, Map<String, Double>> int int int int String int int int getTermMatch()
Returns how the query terms should match terms in the index.
boolean boolean boolean boolean void Inherited Method Summary From class java.lang.Object Objectclone()
boolean voidfinalize()
final Class<?>getClass()
inthashCode()
final voidnotify()
final voidnotifyAll()
StringtoString()
final voidwait(long arg0, int arg1)
final voidwait(long arg0)
final voidwait()
From interface android.os.Parcelable abstract intdescribeContents()
abstract void writeToParcel(
Parcelarg0, int arg1)
Constants public static final int GROUPING_TYPE_PER_NAMESPACEResults should be grouped together by namespace for the purpose of enforcing a limit on the number of results returned per namespace.
Constant Value: 2
public static final int GROUPING_TYPE_PER_PACKAGEResults should be grouped together by package for the purpose of enforcing a limit on the number of results returned per package.
Constant Value: 1
public static final int GROUPING_TYPE_PER_SCHEMAResults should be grouped together by schema type for the purpose of enforcing a limit on the number of results returned per schema type.
Constant Value: 4
public static final int ORDER_ASCENDINGSearch results will be returned in an ascending order.
Constant Value: 1
public static final int ORDER_DESCENDINGSearch results will be returned in a descending order.
Constant Value: 0
public static final String PROJECTION_SCHEMA_TYPE_WILDCARD public static final int RANKING_STRATEGY_ADVANCED_RANKING_EXPRESSIONRanked by the advanced ranking expression provided.
Constant Value: 9
public static final int RANKING_STRATEGY_CREATION_TIMESTAMPRanked by document creation timestamps.
Constant Value: 2
public static final int RANKING_STRATEGY_DOCUMENT_SCORERanked by app-provided document scores.
Constant Value: 1
public static final int RANKING_STRATEGY_JOIN_AGGREGATE_SCORE public static final int RANKING_STRATEGY_NONENo Ranking, results are returned in arbitrary order.
Constant Value: 0
public static final int RANKING_STRATEGY_RELEVANCE_SCORERanked by document relevance score.
Constant Value: 3
public static final int RANKING_STRATEGY_SYSTEM_USAGE_COUNTRanked by number of usages from a system UI surface.
Constant Value: 6
public static final int RANKING_STRATEGY_SYSTEM_USAGE_LAST_USED_TIMESTAMPRanked by timestamp of last usage from a system UI surface.
Constant Value: 7
public static final int RANKING_STRATEGY_USAGE_COUNTRanked by number of usages, as reported by the app.
Constant Value: 4
public static final int RANKING_STRATEGY_USAGE_LAST_USED_TIMESTAMPRanked by timestamp of last usage, as reported by the app.
Constant Value: 5
public static final String SCHEMA_TYPE_WILDCARD public static final int TERM_MATCH_EXACT_ONLYQuery terms will only match exact tokens in the index.
For example, a query term "foo" will only match indexed token "foo", and not "foot" or "football".
Constant Value: 1
public static final int TERM_MATCH_PREFIXQuery terms will match indexed tokens when the query term is a prefix of the token.
For example, a query term "foo" will match indexed tokens like "foo", "foot", and "football".
Constant Value: 2
Fields Public Methods public String getAdvancedRankingExpression () public List<String> getFilterNamespaces ()Returns the list of namespaces to search over.
If empty, the query will search over all namespaces.
public List<String> getFilterPackageNames ()Returns the list of package name filters to search over.
If empty, the query will search over all packages that the caller has access to. If package names are specified which caller doesn't have access to, then those package names will be ignored.
public Map<String, List<String>> getFilterProperties ()Returns the map of schema and target properties to search over.
If empty, will search over all schema and properties.
Calling this function repeatedly is inefficient. Prefer to retain the Map returned by this function, rather than calling it multiple times.
public List<String> getFilterSchemas ()Returns the list of schema types to search for.
If empty, the query will search over all schema types.
public JoinSpec getJoinSpec ()Returns specification on which documents need to be joined.
public int getMaxSnippetSize ()Returns the maximum size of a snippet in characters.
public int getOrder ()Returns the order of returned search results (descending or ascending).
public Map<String, List<PropertyPath>> getProjectionPaths ()Returns a map from schema type to property paths to be used for projection.
If the map is empty, then all properties will be retrieved for all results.
Calling this function repeatedly is inefficient. Prefer to retain the Map returned by this function, rather than calling it multiple times.
ReturnsPropertyPath
objects.Returns a map from schema type to property paths to be used for projection.
If the map is empty, then all properties will be retrieved for all results.
Calling this function repeatedly is inefficient. Prefer to retain the Map returned by this function, rather than calling it multiple times.
ReturnsReturns properties weights to be used for scoring.
Calling this function repeatedly is inefficient. Prefer to retain the Map
returned by this function, rather than calling it multiple times.
Map
of schema type to an inner-map of property paths of the schema type to the weight to set for that property.Returns properties weights to be used for scoring.
Calling this function repeatedly is inefficient. Prefer to retain the Map
returned by this function, rather than calling it multiple times.
Map
of schema type to an inner-map of property paths of the schema type to the weight to set for that property.Returns the ranking strategy.
public int getResultCountPerPage ()Returns the number of results per page in the result set.
public int getResultGroupingLimit ()Get the maximum number of results to return for each group.
public int getResultGroupingTypeFlags () public String getSearchSourceLogTag ()Gets a tag to indicate the source of this search, or null
if SearchSpec.Builder.setSearchSourceLogTag(String)
was not called.
Some AppSearch implementations may log a hash of this tag using statsd. This tag may be used for tracing performance issues and crashes to a component of an app.
Call SearchSpec.Builder.setSearchSourceLogTag(String)
and give a unique value if you want to distinguish this search scenario with other search scenarios during performance analysis.
Under no circumstances will AppSearch log the raw String value using statsd, but it will be provided as-is to custom AppSearchLogger
implementations you have registered in your app.
Returns how many documents to generate snippets for.
public int getSnippetCountPerProperty ()Returns how many matches for each property of a matching document to generate snippets for.
public int getTermMatch ()Returns how the query terms should match terms in the index.
public boolean isListFilterHasPropertyFunctionEnabled ()Returns whether the LIST_FILTER_HAS_PROPERTY_FUNCTION feature is enabled.
public boolean isListFilterQueryLanguageEnabled ()Returns whether the LIST_FILTER_QUERY_LANGUAGE feature is enabled.
public boolean isNumericSearchEnabled ()Returns whether the NUMERIC_SEARCH feature is enabled.
public boolean isVerbatimSearchEnabled ()Returns whether the VERBATIM_SEARCH feature is enabled.
public void writeToParcel (Parcel dest, int flags)RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4