AppSearchSchema.PropertyConfig
public abstract class AppSearchSchema.PropertyConfig
AppSearchSchema.BlobHandlePropertyConfig |
Configuration for a property of type |
AppSearchSchema.BooleanPropertyConfig |
Configuration for a property containing a boolean. |
AppSearchSchema.BytesPropertyConfig |
Configuration for a property containing a byte array. |
AppSearchSchema.DocumentPropertyConfig |
Configuration for a property containing another Document. |
AppSearchSchema.DoublePropertyConfig |
Configuration for a property containing a double-precision decimal number. |
AppSearchSchema.EmbeddingPropertyConfig |
Configuration for a property of type |
AppSearchSchema.LongPropertyConfig |
Configuration for a property containing a 64-bit integer. |
AppSearchSchema.StringPropertyConfig |
Configuration for a property of type String in a Document. |
Common configuration for a single property (field) in a Document.
For example, an EmailMessage would be a type and the subject would be a property.
Summary
Constants |
|
|---|---|
static final int |
Zero or one value [0,1]. |
static final int |
Any number of items (including zero) [0...*]. |
static final int |
Exactly one value [1]. |
Public methods |
|
|---|---|
boolean |
|
int |
Returns the cardinality of the property (whether it is optional, required or repeated). |
@NonNull String |
Returns a natural language description of this property. |
@NonNull String |
getName()Returns the name of this property. |
int |
hashCode() |
@NonNull String |
toString() |
Constants
CARDINALITY_OPTIONAL
public static final int CARDINALITY_OPTIONAL = 2
Zero or one value [0,1].
CARDINALITY_REPEATED
public static final int CARDINALITY_REPEATED = 1
Any number of items (including zero) [0...*].
CARDINALITY_REQUIRED
public static final int CARDINALITY_REQUIRED = 3
Exactly one value [1].
Public methods
getCardinality
public int getCardinality()
Returns the cardinality of the property (whether it is optional, required or repeated).
getDescription
@ExperimentalAppSearchApi
public @NonNull String 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.