Stay organized with collections
Save and categorize content based on your preferences.
@Documented
@Retention(value = RetentionPolicy.CLASS)
@Target(value = [ElementType.FIELD, ElementType.METHOD])
public annotation Document.BooleanProperty
Configures a boolean member field of a class as a property known to AppSearch.
Summary
Public methods |
abstract String |
The name of this property.
|
abstract boolean |
Configures whether this property must be specified for the document to be valid.
|
Public methods
public abstract String name()
The name of this property. This string is used to query against this property.
If not specified, the name of the field in the code will be used instead.
public abstract boolean required()
Configures whether this property must be specified for the document to be valid.
This attribute does not apply to properties of a repeated type (e.g. a list).
Please make sure you understand the consequences of required fields on schema migration before setting this attribute to true.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-06-24 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-24 UTC."],[],[]]