Added in API level 31

StringPropertyConfig


class StringPropertyConfig : AppSearchSchema.PropertyConfig

Configuration for a property of type String in a Document.

Summary

Nested classes

Builder for StringPropertyConfig.

Constants
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
Int CARDINALITY_OPTIONAL

Zero or one value [0,1].

Int CARDINALITY_REPEATED

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

Int CARDINALITY_REQUIRED

Exactly one value [1].

Public methods
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
Boolean equals(other: Any?)

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.

Int getCardinality()

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

String getName()

Returns the name of this property.

Int hashCode()

String toString()

Returns a string representation of the object.

Constants

INDEXING_TYPE_EXACT_TERMS

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

static val JOINABLE_VALUE_TYPE_NONE: Int

Content in this property is not joinable.

Value: 0

JOINABLE_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.

Value: 1

TOKENIZER_TYPE_NONE

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

TOKENIZER_TYPE_PLAIN

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

TOKENIZER_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: 3

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

Public methods

getJoinableValueType

fun getJoinableValueType(): Int

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