StringPropertyConfig
class StringPropertyConfig : AppSearchSchema.PropertyConfig
| kotlin.Any | ||
| ↳ | android.app.appsearch.AppSearchSchema.PropertyConfig | |
| ↳ | android.app.appsearch.AppSearchSchema.StringPropertyConfig | |
Configuration for a property of type String in a Document.
Summary
| Nested classes | |
|---|---|
|
Builder for |
|
| Constants | |
|---|---|
| static Int |
Does not propagate deletion. |
| static Int |
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. |
| static Int |
Content in this property should only be returned for queries matching the exact tokens appearing in this property. |
| static Int |
Content in this property will not be tokenized or indexed. |
| static Int |
Content in this property should be returned for queries that are either exact matches or query matches of the tokens appearing in this property. |
| static Int |
Content in this property is not joinable. |
| static Int |
Content in this string property will be used as a qualified id to join documents. |
| static Int |
This value indicates that no tokens should be extracted from this property. |
| static Int |
Tokenization for plain text. |
| static Int |
Tokenization for emails. |
| static Int |
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 |
Returns how the deletion will be propagated between this document and the referenced document whose qualified id is held by this property. |
| Int |
Returns how the property is indexed. |
| Int |
Returns how this property is going to be used to join documents from other schema types. |
| Int |
Returns how this property is tokenized (split into words). |
| Inherited functions | |
|---|---|
Constants
DELETE_PROPAGATION_TYPE_NONE
static val DELETE_PROPAGATION_TYPE_NONE: Int
Does not propagate deletion.
Value: 0DELETE_PROPAGATION_TYPE_PROPAGATE_FROM
static val DELETE_PROPAGATION_TYPE_PROPAGATE_FROM: Int
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).
Value: 1INDEXING_TYPE_EXACT_TERMS
static val INDEXING_TYPE_EXACT_TERMS: Int
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".
Value: 1INDEXING_TYPE_NONE
static val INDEXING_TYPE_NONE: Int
Content in this property will not be tokenized or indexed.
Value: 0INDEXING_TYPE_PREFIXES
static val INDEXING_TYPE_PREFIXES: Int
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".
Value: 2JOINABLE_VALUE_TYPE_NONE
static val JOINABLE_VALUE_TYPE_NONE: Int
Content in this property is not joinable.
Value: 0JOINABLE_VALUE_TYPE_QUALIFIED_ID
static val JOINABLE_VALUE_TYPE_QUALIFIED_ID: Int
Content in this string property will be used as a qualified id to join documents.
- Qualified id: a unique identifier for a document, and this joinable value type is similar to primary and foreign key in relational database. See
android.app.appsearch.util.DocumentIdUtilfor more details. - Currently we only support single string joining, so it should only be used with
PropertyConfig.CARDINALITY_OPTIONALandPropertyConfig.CARDINALITY_REQUIRED.
Value: 1TOKENIZER_TYPE_NONE
static val TOKENIZER_TYPE_NONE: Int
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.
Value: 0TOKENIZER_TYPE_PLAIN
static val TOKENIZER_TYPE_PLAIN: Int
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.
Value: 1TOKENIZER_TYPE_RFC822
static val TOKENIZER_TYPE_RFC822: Int
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.
Value: 3TOKENIZER_TYPE_VERBATIM
static val TOKENIZER_TYPE_VERBATIM: Int
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.
Value: 2Public methods
getDeletePropagationType
fun getDeletePropagationType(): Int
Returns how the deletion will be propagated between this document and the referenced document whose qualified id is held by this property.
| Return | |
|---|---|
Int |
Value is one of the following: |
getIndexingType
fun getIndexingType(): Int
Returns how the property is indexed.
| Return | |
|---|---|
Int |
Value is one of the following: |
getJoinableValueType
fun getJoinableValueType(): Int
Returns how this property is going to be used to join documents from other schema types.
| Return | |
|---|---|
Int |
Value is one of the following: |
getTokenizerType
fun getTokenizerType(): Int
Returns how this property is tokenized (split into words).
| Return | |
|---|---|
Int |
Value is one of the following: |