Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# StringPropertyConfig

*** ** * ** ***

```
class StringPropertyConfig : AppSearchSchema.PropertyConfig
```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||
| ↳ | [android.app.appsearch.AppSearchSchema.PropertyConfig](https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig) ||
|   | ↳ | [android.app.appsearch.AppSearchSchema.StringPropertyConfig](https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#) |

Configuration for a property of type String in a Document.

## Summary

| Nested classes ||
|---|---|
|   | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder` Builder for `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#`. |

| Constants ||
|---|---|
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#DELETE_PROPAGATION_TYPE_NONE:kotlin.Int` Does not propagate deletion. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#DELETE_PROPAGATION_TYPE_PROPAGATE_FROM:kotlin.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](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_EXACT_TERMS:kotlin.Int` Content in this property should only be returned for queries matching the exact tokens appearing in this property. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_NONE:kotlin.Int` Content in this property will not be tokenized or indexed. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_PREFIXES:kotlin.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](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_NONE:kotlin.Int` Content in this property is not joinable. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_QUALIFIED_ID:kotlin.Int` Content in this string property will be used as a qualified id to join documents. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_NONE:kotlin.Int` This value indicates that no tokens should be extracted from this property. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_PLAIN:kotlin.Int` Tokenization for plain text. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_RFC822:kotlin.Int` Tokenization for emails. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_VERBATIM:kotlin.Int` This value indicates that no normalization or segmentation should be applied to string values that are tokenized using this type. |

Inherited constants From class `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig` `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_OPTIONAL:kotlin.Int`


Zero or one value \[0,1\].

<br />

`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_REPEATED:kotlin.Int`


Any number of items (including zero) \[0...\*\].

<br />

`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_REQUIRED:kotlin.Int`


Exactly one value \[1\].

<br />

| Public methods ||
|---|---|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#getDeletePropagationType()()` Returns how the deletion will be propagated between this document and the referenced document whose qualified id is held by this property. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#getIndexingType()()` Returns how the property is indexed. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#getJoinableValueType()()` Returns how this property is going to be used to join documents from other schema types. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#getTokenizerType()()` Returns how this property is tokenized (split into words). |

Inherited functions From class `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig` `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#equals(kotlin.Any)(other: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?)`


Indicates whether some other object is "equal to" this one.

The `equals` method implements an equivalence relation on non-null object references:

- It is *reflexive* : for any non-null reference value `x`, `x.equals(x)` should return `true`.
- It is *symmetric* : for any non-null reference values `x` and `y`, `x.equals(y)` should return `true` if and only if `y.equals(x)` returns `true`.
- It is *transitive* : for any non-null reference values `x`, `y`, and `z`, if `x.equals(y)` returns `true` and `y.equals(z)` returns `true`, then `x.equals(z)` should return `true`.
- It is *consistent* : for any non-null reference values `x` and `y`, multiple invocations of `x.equals(y)` consistently return `true` or consistently return `false`, provided no information used in `equals` comparisons on the objects is modified.
- For any non-null reference value `x`, `x.equals(null)` should return `false`.

An equivalence relation partitions the elements it operates on into *equivalence classes*; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

<br />

`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#getCardinality()()`


Returns the cardinality of the property (whether it is optional, required or repeated).

<br />

`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#getDescription()()`


Returns a natural language description of this property.

Ex. The description for the "homeAddress" property of a "Person" type could be "the address at which this person lives".

This information is purely to help apps consuming this type the semantic meaning of its properties. This field has no effect in AppSearch - it is just stored with the AppSearchSchema. If the description is not set, then this method will return an empty string.

<br />

`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#getName()()`


Returns the name of this property.

<br />

`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#hashCode()()`


Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by `https://developer.android.com/reference/kotlin/java/util/HashMap.html#`.

The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `https://developer.android.com/reference/kotlin/java/lang/Object.html#equals(kotlin.Any)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is *not* required that if two objects are unequal according to the `https://developer.android.com/reference/kotlin/java/lang/Object.html#equals(kotlin.Any)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#toString()()`


Returns a string representation of the object.

<br />

## Constants

### DELETE_PROPAGATION_TYPE_NONE

Added in [API level 37.2](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [T Extensions 24](https://developer.android.com/sdkExtensions)

```
static val DELETE_PROPAGATION_TYPE_NONE: Int
```

Does not propagate deletion.

    Value: 0

### DELETE_PROPAGATION_TYPE_PROPAGATE_FROM

Added in [API level 37.2](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [T Extensions 24](https://developer.android.com/sdkExtensions)

```
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 `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_QUALIFIED_ID:kotlin.Int` for the joinable value type). Otherwise, throw `https://developer.android.com/reference/kotlin/java/lang/IllegalStateException.html#` when building (see `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig.Builder#build()`).

    Value: 1

### INDEXING_TYPE_EXACT_TERMS

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
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: 1

### INDEXING_TYPE_NONE

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static val INDEXING_TYPE_NONE: Int
```

Content in this property will not be tokenized or indexed.

    Value: 0

### INDEXING_TYPE_PREFIXES

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
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: 2

### JOINABLE_VALUE_TYPE_NONE

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [T Extensions 7](https://developer.android.com/sdkExtensions)

```
static val JOINABLE_VALUE_TYPE_NONE: Int
```

Content in this property is not joinable.

    Value: 0

### JOINABLE_VALUE_TYPE_QUALIFIED_ID

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [T Extensions 7](https://developer.android.com/sdkExtensions)

```
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 `https://developer.android.com/reference/kotlin/android/app/appsearch/util/DocumentIdUtil` for more details.
- Currently we only support single string joining, so it should only be used with `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_OPTIONAL:kotlin.Int` and `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.PropertyConfig#CARDINALITY_REQUIRED:kotlin.Int`.

<br />

    Value: 1

### TOKENIZER_TYPE_NONE

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
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 `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#getIndexingType()` is `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_NONE:kotlin.Int`.

    Value: 0

### TOKENIZER_TYPE_PLAIN

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
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 `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#getIndexingType()` is `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_EXACT_TERMS:kotlin.Int` or `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_PREFIXES:kotlin.Int`.

    Value: 1

### TOKENIZER_TYPE_RFC822

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [T Extensions 7](https://developer.android.com/sdkExtensions)

```
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 `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#getIndexingType()` is `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_EXACT_TERMS:kotlin.Int` or `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_PREFIXES:kotlin.Int`.

    Value: 3

### TOKENIZER_TYPE_VERBATIM

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [T Extensions 7](https://developer.android.com/sdkExtensions)

```
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 `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#getIndexingType()` is `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_EXACT_TERMS:kotlin.Int` or `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_PREFIXES:kotlin.Int`.

    Value: 2

## Public methods

### getDeletePropagationType

Added in [API level 37.2](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [T Extensions 24](https://developer.android.com/sdkExtensions)

```
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 ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | Value is one of the following: - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#DELETE_PROPAGATION_TYPE_NONE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#DELETE_PROPAGATION_TYPE_PROPAGATE_FROM:kotlin.Int` |

### getIndexingType

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun getIndexingType(): Int
```

Returns how the property is indexed.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | Value is one of the following: - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_NONE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_EXACT_TERMS:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#INDEXING_TYPE_PREFIXES:kotlin.Int` |

### getJoinableValueType

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Also in [T Extensions 7](https://developer.android.com/sdkExtensions)

```
fun getJoinableValueType(): Int
```

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

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | Value is one of the following: - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_NONE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#JOINABLE_VALUE_TYPE_QUALIFIED_ID:kotlin.Int` |

### getTokenizerType

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun getTokenizerType(): Int
```

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

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | Value is one of the following: - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_NONE:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_PLAIN:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_VERBATIM:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/app/appsearch/AppSearchSchema.StringPropertyConfig#TOKENIZER_TYPE_RFC822:kotlin.Int` |