public interface Features


A class that encapsulates all features that are only supported in certain cases (e.g. only on certain implementations or only at a certain Android API Level).

Features do not depend on any runtime state, and features will never be removed. Once isFeatureSupported returns true for a certain feature, it is safe to assume that the feature will be available forever on that AppSearch storage implementation, at that Android API level, on that device.

Summary

Constants

default static final String
ADD_PERMISSIONS_AND_GET_VISIBILITY = "ADD_PERMISSIONS_AND_GET_VISIBILITY"

Feature for isFeatureSupported.

default static final String
ENTERPRISE_GLOBAL_SEARCH_SESSION = "ENTERPRISE_GLOBAL_SEARCH_SESSION"

Feature for isFeatureSupported.

default static final String
GLOBAL_SEARCH_SESSION_GET_BY_ID = "GLOBAL_SEARCH_SESSION_GET_BY_ID"

Feature for isFeatureSupported.

default static final String
GLOBAL_SEARCH_SESSION_GET_SCHEMA = "GLOBAL_SEARCH_SESSION_GET_SCHEMA"

Feature for isFeatureSupported.

default static final String
GLOBAL_SEARCH_SESSION_REGISTER_OBSERVER_CALLBACK = "GLOBAL_SEARCH_SESSION_REGISTER_OBSERVER_CALLBACK"

Feature for isFeatureSupported.

default static final String
JOIN_SPEC_AND_QUALIFIED_ID = "JOIN_SPEC_AND_QUALIFIED_ID"

Feature for isFeatureSupported.

default static final String
LIST_FILTER_HAS_PROPERTY_FUNCTION = "LIST_FILTER_HAS_PROPERTY_FUNCTION"

Feature for isFeatureSupported.

default static final String
LIST_FILTER_QUERY_LANGUAGE = "LIST_FILTER_QUERY_LANGUAGE"

Feature for isFeatureSupported.

default static final String
NUMERIC_SEARCH = "NUMERIC_SEARCH"

Feature for isFeatureSupported.

default static final String
SCHEMA_ADD_INDEXABLE_NESTED_PROPERTIES = "SCHEMA_ADD_INDEXABLE_NESTED_PROPERTIES"

Feature for isFeatureSupported.

default static final String
SCHEMA_ADD_PARENT_TYPE = "SCHEMA_ADD_PARENT_TYPE"

Feature for isFeatureSupported.

default static final String
SCHEMA_EMBEDDING_PROPERTY_CONFIG = "SCHEMA_EMBEDDING_PROPERTY_CONFIG"

Feature for isFeatureSupported.

default static final String
SCHEMA_SET_DESCRIPTION = "SCHEMA_SET_DESCRIPTION"

Feature for isFeatureSupported.

default static final String
SEARCH_RESULT_MATCH_INFO_SUBMATCH = "SEARCH_RESULT_MATCH_INFO_SUBMATCH"

Feature for isFeatureSupported.

default static final String
SEARCH_SPEC_ADD_FILTER_PROPERTIES = "SEARCH_SPEC_ADD_FILTER_PROPERTIES"

Feature for isFeatureSupported.

default static final String
SEARCH_SPEC_ADD_INFORMATIONAL_RANKING_EXPRESSIONS = "SEARCH_SPEC_ADD_INFORMATIONAL_RANKING_EXPRESSIONS"

Feature for isFeatureSupported.

default static final String
SEARCH_SPEC_ADVANCED_RANKING_EXPRESSION = "SEARCH_SPEC_ADVANCED_RANKING_EXPRESSION"

Feature for isFeatureSupported.

default static final String
SEARCH_SPEC_GROUPING_TYPE_PER_SCHEMA = "SEARCH_SPEC_GROUPING_TYPE_PER_SCHEMA"

Feature for isFeatureSupported.

default static final String
SEARCH_SPEC_PROPERTY_WEIGHTS = "SEARCH_SPEC_PROPERTY_WEIGHTS"

Feature for isFeatureSupported.

default static final String
SEARCH_SPEC_SEARCH_STRING_PARAMETERS = "SEARCH_SPEC_SEARCH_STRING_PARAMETERS"

Feature for isFeatureSupported.

default static final String
SEARCH_SPEC_SET_SEARCH_SOURCE_LOG_TAG = "SEARCH_SPEC_SET_SEARCH_SOURCE_LOG_TAG"

Feature for isFeatureSupported.

default static final String
SEARCH_SUGGESTION = "SEARCH_SUGGESTION"

Feature for isFeatureSupported.

default static final String
SET_SCHEMA_CIRCULAR_REFERENCES = "SET_SCHEMA_CIRCULAR_REFERENCES"

Feature for isFeatureSupported.

default static final String
SET_SCHEMA_REQUEST_ADD_SCHEMA_TYPE_VISIBLE_TO_CONFIG = "SET_SCHEMA_REQUEST_ADD_SCHEMA_TYPE_VISIBLE_TO_CONFIG"

Feature for isFeatureSupported.

default static final String
SET_SCHEMA_REQUEST_SET_PUBLICLY_VISIBLE = "SET_SCHEMA_REQUEST_SET_PUBLICLY_VISIBLE"

Feature for isFeatureSupported.

default static final String
TOKENIZER_TYPE_RFC822 = "TOKENIZER_TYPE_RFC822"

Feature for isFeatureSupported.

default static final String
VERBATIM_SEARCH = "VERBATIM_SEARCH"

Feature for isFeatureSupported.

Public methods

abstract int

Returns the maximum amount of properties that can be indexed in a Document given the Android API level and AppSearch backend.

abstract boolean

Returns whether a feature is supported at run-time.

Constants

ENTERPRISE_GLOBAL_SEARCH_SESSION

Added in 1.1.0-alpha06
default static final String ENTERPRISE_GLOBAL_SEARCH_SESSION = "ENTERPRISE_GLOBAL_SEARCH_SESSION"

Feature for isFeatureSupported. This feature covers EnterpriseGlobalSearchSession

GLOBAL_SEARCH_SESSION_GET_BY_ID

Added in 1.1.0-alpha06
default static final String GLOBAL_SEARCH_SESSION_GET_BY_ID = "GLOBAL_SEARCH_SESSION_GET_BY_ID"

Feature for isFeatureSupported. This feature covers getByDocumentIdAsync.

GLOBAL_SEARCH_SESSION_GET_SCHEMA

Added in 1.1.0-alpha06
default static final String GLOBAL_SEARCH_SESSION_GET_SCHEMA = "GLOBAL_SEARCH_SESSION_GET_SCHEMA"

Feature for isFeatureSupported. This feature covers getSchemaAsync.

GLOBAL_SEARCH_SESSION_REGISTER_OBSERVER_CALLBACK

Added in 1.1.0-alpha06
default static final String GLOBAL_SEARCH_SESSION_REGISTER_OBSERVER_CALLBACK = "GLOBAL_SEARCH_SESSION_REGISTER_OBSERVER_CALLBACK"

Feature for isFeatureSupported. This feature covers registerObserverCallback and unregisterObserverCallback.

JOIN_SPEC_AND_QUALIFIED_ID

Added in 1.1.0-alpha06
default static final String JOIN_SPEC_AND_QUALIFIED_ID = "JOIN_SPEC_AND_QUALIFIED_ID"

Feature for isFeatureSupported. This feature covers JOINABLE_VALUE_TYPE_QUALIFIED_ID, setJoinSpec, and all other join features.

LIST_FILTER_HAS_PROPERTY_FUNCTION

Added in 1.1.0-alpha06
default static final String LIST_FILTER_HAS_PROPERTY_FUNCTION = "LIST_FILTER_HAS_PROPERTY_FUNCTION"

Feature for isFeatureSupported. This feature covers the use of the "hasProperty" function in query expressions.

For details on the "hasProperty" function in the query language, see search.

LIST_FILTER_QUERY_LANGUAGE

Added in 1.1.0-alpha06
default static final String LIST_FILTER_QUERY_LANGUAGE = "LIST_FILTER_QUERY_LANGUAGE"

Feature for isFeatureSupported. This feature covers the expansion of the query language to conform to the definition of the list filters language (https://aip.dev/160).

For more details, see search.

NUMERIC_SEARCH

Added in 1.1.0-alpha06
default static final String NUMERIC_SEARCH = "NUMERIC_SEARCH"

Feature for isFeatureSupported. This feature covers INDEXING_TYPE_RANGE and all other numeric search features.

For details on the numeric search expressions in the query language, see search.

SCHEMA_ADD_INDEXABLE_NESTED_PROPERTIES

Added in 1.1.0-alpha06
default static final String SCHEMA_ADD_INDEXABLE_NESTED_PROPERTIES = "SCHEMA_ADD_INDEXABLE_NESTED_PROPERTIES"

Feature for isFeatureSupported. This feature covers addIndexableNestedProperties

SCHEMA_ADD_PARENT_TYPE

Added in 1.1.0-alpha06
default static final String SCHEMA_ADD_PARENT_TYPE = "SCHEMA_ADD_PARENT_TYPE"

Feature for isFeatureSupported. This feature covers addParentType.

SCHEMA_EMBEDDING_PROPERTY_CONFIG

Added in 1.1.0-alpha06
default static final String SCHEMA_EMBEDDING_PROPERTY_CONFIG = "SCHEMA_EMBEDDING_PROPERTY_CONFIG"

Feature for isFeatureSupported. This feature covers AppSearchSchema.EmbeddingPropertyConfig.

For details on the embedding search expressions, see search for the query language and setRankingStrategy for the ranking language.

SCHEMA_SET_DESCRIPTION

Added in 1.1.0-alpha06
default static final String SCHEMA_SET_DESCRIPTION = "SCHEMA_SET_DESCRIPTION"

Feature for isFeatureSupported. This feature covers whether or not the AppSearch backend can store the descriptions returned by getDescription and getDescription.

SEARCH_RESULT_MATCH_INFO_SUBMATCH

Added in 1.1.0-alpha06
default static final String SEARCH_RESULT_MATCH_INFO_SUBMATCH = "SEARCH_RESULT_MATCH_INFO_SUBMATCH"

Feature for isFeatureSupported. This feature covers getSubmatchRange and getSubmatch.

SEARCH_SPEC_ADD_FILTER_PROPERTIES

Added in 1.1.0-alpha06
default static final String SEARCH_SPEC_ADD_FILTER_PROPERTIES = "SEARCH_SPEC_ADD_FILTER_PROPERTIES"

Feature for isFeatureSupported. This feature covers addFilterProperties and addFilterProperties.

SEARCH_SPEC_ADD_INFORMATIONAL_RANKING_EXPRESSIONS

Added in 1.1.0-alpha06
default static final String SEARCH_SPEC_ADD_INFORMATIONAL_RANKING_EXPRESSIONS = "SEARCH_SPEC_ADD_INFORMATIONAL_RANKING_EXPRESSIONS"

Feature for isFeatureSupported. This feature covers addInformationalRankingExpressions.

SEARCH_SPEC_ADVANCED_RANKING_EXPRESSION

Added in 1.1.0-alpha06
default static final String SEARCH_SPEC_ADVANCED_RANKING_EXPRESSION = "SEARCH_SPEC_ADVANCED_RANKING_EXPRESSION"

Feature for isFeatureSupported. This feature covers setRankingStrategy.

SEARCH_SPEC_GROUPING_TYPE_PER_SCHEMA

Added in 1.1.0-alpha06
default static final String SEARCH_SPEC_GROUPING_TYPE_PER_SCHEMA = "SEARCH_SPEC_GROUPING_TYPE_PER_SCHEMA"

Feature for isFeatureSupported. This feature covers GROUPING_TYPE_PER_SCHEMA

SEARCH_SPEC_PROPERTY_WEIGHTS

Added in 1.1.0-alpha06
default static final String SEARCH_SPEC_PROPERTY_WEIGHTS = "SEARCH_SPEC_PROPERTY_WEIGHTS"

Feature for isFeatureSupported. This feature covers setPropertyWeights.

SEARCH_SPEC_SEARCH_STRING_PARAMETERS

Added in 1.1.0-alpha06
default static final String SEARCH_SPEC_SEARCH_STRING_PARAMETERS = "SEARCH_SPEC_SEARCH_STRING_PARAMETERS"

Feature for isFeatureSupported. This feature covers the support of the addSearchStringParameters and addSearchStringParameters apis.

SEARCH_SPEC_SET_SEARCH_SOURCE_LOG_TAG

Added in 1.1.0-alpha06
default static final String SEARCH_SPEC_SET_SEARCH_SOURCE_LOG_TAG = "SEARCH_SPEC_SET_SEARCH_SOURCE_LOG_TAG"

Feature for isFeatureSupported. This feature covers setSearchSourceLogTag.

SEARCH_SUGGESTION

Added in 1.1.0-alpha06
default static final String SEARCH_SUGGESTION = "SEARCH_SUGGESTION"

Feature for isFeatureSupported. This feature covers searchSuggestionAsync.

SET_SCHEMA_CIRCULAR_REFERENCES

Added in 1.1.0-alpha06
default static final String SET_SCHEMA_CIRCULAR_REFERENCES = "SET_SCHEMA_CIRCULAR_REFERENCES"

Feature for isFeatureSupported. This feature covers setting schemas with circular references for setSchemaAsync.

SET_SCHEMA_REQUEST_ADD_SCHEMA_TYPE_VISIBLE_TO_CONFIG

Added in 1.1.0-alpha06
default static final String SET_SCHEMA_REQUEST_ADD_SCHEMA_TYPE_VISIBLE_TO_CONFIG = "SET_SCHEMA_REQUEST_ADD_SCHEMA_TYPE_VISIBLE_TO_CONFIG"

Feature for isFeatureSupported. This feature covers addSchemaTypeVisibleToConfig.

SET_SCHEMA_REQUEST_SET_PUBLICLY_VISIBLE

Added in 1.1.0-alpha06
default static final String SET_SCHEMA_REQUEST_SET_PUBLICLY_VISIBLE = "SET_SCHEMA_REQUEST_SET_PUBLICLY_VISIBLE"

Feature for isFeatureSupported. This feature covers setPubliclyVisibleSchema.

TOKENIZER_TYPE_RFC822

Added in 1.1.0-alpha06
default static final String TOKENIZER_TYPE_RFC822 = "TOKENIZER_TYPE_RFC822"

Feature for isFeatureSupported. This feature covers TOKENIZER_TYPE_RFC822.

VERBATIM_SEARCH

Added in 1.1.0-alpha06
default static final String VERBATIM_SEARCH = "VERBATIM_SEARCH"

Feature for isFeatureSupported. This feature covers TOKENIZER_TYPE_VERBATIM and all other verbatim search features within the query language that allows clients to search using the verbatim string operator.

For details on the verbatim string operator, see search.

Public methods

getMaxIndexedProperties

Added in 1.1.0-alpha06
abstract int getMaxIndexedProperties()

Returns the maximum amount of properties that can be indexed in a Document given the Android API level and AppSearch backend.

A property is defined as all values that are present at a particular path.

isFeatureSupported

Added in 1.1.0-alpha06
abstract boolean isFeatureSupported(@NonNull String feature)

Returns whether a feature is supported at run-time. Feature support depends on the feature in question, the AppSearch backend being used and the Android version of the device.

Note: If this method returns false, it is not safe to invoke the methods requiring the desired feature.

Parameters
@NonNull String feature

the feature to be checked

Returns
boolean

whether the capability is supported given the Android API level and AppSearch backend.