AppSearchSchema.StringPropertyConfig


public static final class AppSearchSchema.StringPropertyConfig
extends AppSearchSchema.PropertyConfig

java.lang.Object
   ↳ android.app.appsearch.AppSearchSchema.PropertyConfig
     ↳ android.app.appsearch.AppSearchSchema.StringPropertyConfig


Configuration for a property of type String in a Document.

Summary

Nested classes

class AppSearchSchema.StringPropertyConfig.Builder

Builder for StringPropertyConfig

Constants

int DELETE_PROPAGATION_TYPE_NONE

Does not propagate deletion.

int DELETE_PROPAGATION_TYPE_PROPAGATE_FROM

Content in this string property will be used as a qualified id referring to another (parent) document, and the deletion of the referenced document will propagate to this (child) document.

int INDEXING_TYPE_EXACT_TERMS

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

int INDEXING_TYPE_NONE

Content in this property will not be tokenized or indexed.

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.

int JOINABLE_VALUE_TYPE_NONE

Content in this property is not joinable.

int JOINABLE_VALUE_TYPE_QUALIFIED_ID

Content in this string property will be used as a qualified id to join documents.

int TOKENIZER_TYPE_NONE

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

int TOKENIZER_TYPE_PLAIN

Tokenization for plain text.

int TOKENIZER_TYPE_RFC822

Tokenization for emails.

int TOKENIZER_TYPE_VERBATIM

This value indicates that no normalization or segmentation should be applied to string values that are tokenized using this type.

Inherited constants

Public methods

int getDeletePropagationType()

Returns how the deletion will be propagated between this document and the referenced document whose qualified id is held by this property.

int getIndexingType()

Returns how the property is indexed.

int getJoinableValueType()

Returns how this property is going to be used to join documents from other schema types.

int getTokenizerType()

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

Inherited methods

Constants

DELETE_PROPAGATION_TYPE_NONE

Added in API level 10000
public static final int DELETE_PROPAGATION_TYPE_NONE

Does not propagate deletion.

Constant Value: 0 (0x00000000)

DELETE_PROPAGATION_TYPE_PROPAGATE_FROM

Added in API level 10000
public static final int DELETE_PROPAGATION_TYPE_PROPAGATE_FROM

Content in this string property will be used as a qualified id referring to another (parent) document, and the deletion of the referenced document will propagate to this (child) document.

Please note that this propagates further. If the child document has any children that also set delete propagation type PROPAGATE_FROM for their joinable properties, then those (grandchild) documents will be deleted.

Since delete propagation works between the document and the referenced document, if setting this type for delete propagation, the string property should also be qualified id joinable (i.e. having StringPropertyConfig.JOINABLE_VALUE_TYPE_QUALIFIED_ID for the joinable value type). Otherwise, throw IllegalStateException when building (see StringPropertyConfig.Builder.build).

Constant Value: 1 (0x00000001)

INDEXING_TYPE_EXACT_TERMS

Added in API level 31
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.

For example, a property with "fool" should NOT match a query for "foo".

Constant Value: 1 (0x00000001)

INDEXING_TYPE_NONE

Added in API level 31
public static final int INDEXING_TYPE_NONE

Content in this property will not be tokenized or indexed.

Constant Value: 0 (0x00000000)

INDEXING_TYPE_PREFIXES

Added in API level 31
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.

For example, a property with "fool" should match a query for "foo".

Constant Value: 2 (0x00000002)

JOINABLE_VALUE_TYPE_NONE

Added in API level 34
Also in T Extensions 7
public static final int JOINABLE_VALUE_TYPE_NONE

Content in this property is not joinable.

Constant Value: 0 (0x00000000)

JOINABLE_VALUE_TYPE_QUALIFIED_ID

Added in API level 34
Also in T Extensions 7
public static final int JOINABLE_VALUE_TYPE_QUALIFIED_ID

Content in this string property will be used as a qualified id to join documents.

Constant Value: 1 (0x00000001)

TOKENIZER_TYPE_NONE

Added in API level 31
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 getIndexingType() is INDEXING_TYPE_NONE.

Constant Value: 0 (0x00000000)

TOKENIZER_TYPE_PLAIN

Added in API level 31
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.

For example, 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 getIndexingType() is INDEXING_TYPE_EXACT_TERMS or INDEXING_TYPE_PREFIXES.

Constant Value: 1 (0x00000001)

TOKENIZER_TYPE_RFC822

Added in API level 34
Also in T Extensions 7
public static final int TOKENIZER_TYPE_RFC822

Tokenization for emails. This value indicates that tokens should be extracted from this property based on email structure.

For example, a property with "alex.sav@google.com" will produce tokens for "alex", "sav", "alex.sav", "google", "com", and "alexsav@google.com"

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

Constant Value: 3 (0x00000003)

TOKENIZER_TYPE_VERBATIM

Added in API level 34
Also in T Extensions 7
public static final int TOKENIZER_TYPE_VERBATIM

This value indicates that no normalization or segmentation should be applied to string values that are tokenized using this type. Therefore, the output token is equivalent to the raw string value.

For example, a property with "Hello, world!" will produce the token "Hello, world!", preserving punctuation and capitalization, and not creating separate tokens between the space.

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

Constant Value: 2 (0x00000002)

Public methods

getDeletePropagationType

Added in API level 10000
public int getDeletePropagationType ()

Returns how the deletion will be propagated between this document and the referenced document whose qualified id is held by this property.

Returns
int Value is one of the following:

getIndexingType

Added in API level 31
public int getIndexingType ()

Returns how the property is indexed.

Returns
int Value is one of the following:

getJoinableValueType

Added in API level 34
Also in T Extensions 7
public int getJoinableValueType ()

Returns how this property is going to be used to join documents from other schema types.

Returns
int Value is one of the following:

getTokenizerType

Added in API level 31
public int getTokenizerType ()

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

Returns
int Value is one of the following: