AI-generated Key Takeaways
-
AppSearchSchema.PropertyConfigis an abstract class for configuring a single property within a Document in AppSearch. -
It has known direct subclasses for different data types, such as boolean, bytes, document, double, long, and string.
-
The class defines constants for cardinality, indicating whether a property is optional, repeated, or required.
-
Public methods are available to get the cardinality, description, and name of the property, as well as standard
equals,hashCode, andtoStringmethods.
| Known Direct Subclasses |
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.
Constant Summary
| 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 Method Summary
| boolean | |
| int |
getCardinality()
Returns the cardinality of the property (whether it is optional, required or
repeated).
|
| String |
getDescription()
Returns a natural language description of this property.
|
| String |
getName()
Returns the name of this property.
|
| int |
hashCode()
|
| String |
toString()
|
Inherited Method Summary
Constants
public static final int CARDINALITY_OPTIONAL
Zero or one value [0,1].
public static final int CARDINALITY_REPEATED
Any number of items (including zero) [0...*].
public static final int CARDINALITY_REQUIRED
Exactly one value [1].
Public Methods
public boolean equals (Object other)
public int getCardinality ()
Returns the cardinality of the property (whether it is optional, required or repeated).
public 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.
public String getName ()
Returns the name of this property.