Configuration for a property of type String in a Document.
Nested Class Summary
class | AppSearchSchema.StringPropertyConfig.Builder | Builder for
AppSearchSchema.StringPropertyConfig . |
Constant Summary
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 Constant Summary
Public Method Summary
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 Method Summary
Constants
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".
public static final int INDEXING_TYPE_NONE
Content in this property will not be tokenized or indexed.
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".
public static final int JOINABLE_VALUE_TYPE_NONE
Content in this property is not joinable.
public static final int JOINABLE_VALUE_TYPE_QUALIFIED_ID
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
DocumentIdUtil
for more details. - Currently we only support single string joining, so it should only be used with
AppSearchSchema.PropertyConfig.CARDINALITY_OPTIONAL
andAppSearchSchema.PropertyConfig.CARDINALITY_REQUIRED
.
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
.
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
.
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
.
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
.
Public Methods
public int getIndexingType ()
Returns how the property is indexed.
public int getJoinableValueType ()
Returns how this property is going to be used to join documents from other schema types.
public int getTokenizerType ()
Returns how this property is tokenized (split into words).