AppSearchSchema
public final class AppSearchSchema
The AppSearch Schema for a particular type of document.
For example, an e-mail message or a music recording could be a schema type.
The schema consists of type information, properties, and config (like tokenization type).
| See also | |
|---|---|
setSchemaAsync |
Summary
Public methods |
|
|---|---|
boolean |
|
@NonNull String |
Returns a natural language description of this schema type. |
@NonNull List<String> |
Returns the list of parent types of this schema for polymorphism. |
@NonNull List<AppSearchSchema.PropertyConfig> |
Returns the list of |
@NonNull String |
Returns the name of this schema type, such as Email. |
int |
hashCode() |
@NonNull String |
toString() |
Public methods
getDescription
@ExperimentalAppSearchApi
public @NonNull String getDescription()
Returns a natural language description of this schema type.
Ex. The description for an Email type could be "A type of electronic message".
This information is purely to help apps consuming this type to understand its semantic meaning. This field has no effect in AppSearch - it is just stored with the AppSearchSchema. If setDescription is uncalled, then this method will return an empty string.
getParentTypes
public @NonNull List<String> getParentTypes()
Returns the list of parent types of this schema for polymorphism.
getProperties
public @NonNull List<AppSearchSchema.PropertyConfig> getProperties()
Returns the list of PropertyConfigs that are part of this schema.
This method creates a new list when called.
getSchemaType
public @NonNull String getSchemaType()
Returns the name of this schema type, such as Email.