Document.EmbeddingProperty


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


Configures an EmbeddingVector field of a class as a property known to AppSearch.

Summary

Public functions

abstract Int

Configures how a property should be indexed so that it can be retrieved by queries.

abstract String!

The name of this property.

abstract Boolean

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

Public functions

indexingType

Added in 1.1.0-alpha06
abstract fun indexingType(): Int

Configures how a property should be indexed so that it can be retrieved by queries.

If not specified, defaults to INDEXING_TYPE_NONE (the field will not be indexed and cannot be queried).

name

Added in 1.1.0-alpha06
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-alpha06
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.