Document.DocumentProperty

@Documented
@Retention(value = RetentionPolicy.CLASS)
@Target(value = [ElementType.FIELD, ElementType.METHOD])
annotation Document.DocumentProperty


Configures a member field of a class as a property known to AppSearch.

Field's data class is required to be annotated with Document.

Summary

Public functions

abstract Boolean

Configures whether fields in the nested document should be indexed.

abstract String!

The name of this property.

abstract Boolean

Configures whether this property must be specified for the document to be valid.

Public functions

indexNestedProperties

Added in 1.1.0-alpha04
abstract fun indexNestedProperties(): Boolean

Configures whether fields in the nested document should be indexed.

If false, the nested document's properties are not indexed regardless of its own schema.

name

Added in 1.1.0-alpha04
abstract fun name(): String!

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.

required

Added in 1.1.0-alpha04
abstract fun required(): Boolean

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.