public final class

AppSearchSchema.StringPropertyConfig

extends AppSearchSchema.PropertyConfig

 java.lang.Object

androidx.appsearch.app.AppSearchSchema.PropertyConfig

↳androidx.appsearch.app.AppSearchSchema.StringPropertyConfig

Overview

Configuration for a property of type String in a Document.

Summary

Fields
public static final intINDEXING_TYPE_EXACT_TERMS

Content in this property should only be returned for queries matching the exact tokens appearing in this property.

public static final intINDEXING_TYPE_NONE

Content in this property will not be tokenized or indexed.

public static final intINDEXING_TYPE_PREFIXES

Content in this property should be returned for queries that are either exact matches or query matches of the tokens appearing in this property.

public static final intTOKENIZER_TYPE_NONE

This value indicates that no tokens should be extracted from this property.

public static final intTOKENIZER_TYPE_PLAIN

Tokenization for plain text.

from AppSearchSchema.PropertyConfigCARDINALITY_OPTIONAL, CARDINALITY_REPEATED, CARDINALITY_REQUIRED, DATA_TYPE_BOOLEAN, DATA_TYPE_BYTES, DATA_TYPE_DOCUMENT, DATA_TYPE_DOUBLE, DATA_TYPE_LONG, DATA_TYPE_STRING
Methods
public intgetIndexingType()

Returns how the property is indexed.

public intgetTokenizerType()

Returns how this property is tokenized (split into words).

from AppSearchSchema.PropertyConfigequals, fromBundle, getCardinality, getDataType, getName, hashCode, toString
from java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait

Fields

public static final int INDEXING_TYPE_NONE

Content in this property will not be tokenized or indexed.

public static final int INDEXING_TYPE_EXACT_TERMS

Content in this property should only be returned for queries matching the exact tokens appearing in this property.

Ex. A property with "fool" should NOT match a query for "foo".

public static final int INDEXING_TYPE_PREFIXES

Content in this property should be returned for queries that are either exact matches or query matches of the tokens appearing in this property.

Ex. A property with "fool" should match a query for "foo".

public static final int TOKENIZER_TYPE_NONE

This value indicates that no tokens should be extracted from this property.

It is only valid for tokenizer_type to be 'NONE' if AppSearchSchema.StringPropertyConfig.getIndexingType() is AppSearchSchema.StringPropertyConfig.INDEXING_TYPE_NONE.

public static final int TOKENIZER_TYPE_PLAIN

Tokenization for plain text. This value indicates that tokens should be extracted from this property based on word breaks. Segments of whitespace and punctuation are not considered tokens.

Ex. A property with "foo bar. baz." will produce tokens for "foo", "bar" and "baz". The segments " " and "." will not be considered tokens.

It is only valid for tokenizer_type to be 'PLAIN' if AppSearchSchema.StringPropertyConfig.getIndexingType() is AppSearchSchema.StringPropertyConfig.INDEXING_TYPE_EXACT_TERMS or AppSearchSchema.StringPropertyConfig.INDEXING_TYPE_PREFIXES.

Methods

public int getIndexingType()

Returns how the property is indexed.

public int getTokenizerType()

Returns how this property is tokenized (split into words).