QueryText
This field is prose a reader searches by words: a product's name or description, a note, a reason.
A backend that indexes text by word indexes it so, and a search may name it; a search that names no field searches the marked fields. Elasticsearch does so today; the other backends may ignore the marker. A field not marked is matched by its whole value (equality, prefix, contains) and is not searched by words.
It marks a String property, or a list or array of them; never a map, and never a field of a semantic type (QueryReference, QueryTemporal, QueryDecimal, QueryMoney, QueryDuration), whose values are matched exactly, nor a Sensitive one, whose words a search would reveal. It is not a semantic type itself: a field keeps its one semantic type, and this marker combines with none.
data class ProductState(
@field:QueryText
val name: String,
@field:QueryText
val description: String,
val categoryId: String,
)