ObjectField

abstract class ObjectField<T>(parent: ObjectField<*>? = null, name: String, nested: Boolean = false, fieldType: KType) : Container<T>

Base class for containers that model an Elasticsearch object or nested field, i.e. a container with a parent field in the metamodel hierarchy (as opposed to the root Document).

Inheritors

Constructors

Link copied to clipboard
constructor(parent: ObjectField<*>? = null, name: String, nested: Boolean = false, fieldType: KType)

Functions

Link copied to clipboard
inline fun <T> alias(fieldName: String): AliasField<T>

Declares a child AliasField named fieldName, modeling the alias field type.

Link copied to clipboard
inline fun <T> annotatedText(fieldName: String): AnnotatedTextField<T>

Declares a child AnnotatedTextField named fieldName, modeling the annotated_text field type.

Link copied to clipboard
inline fun <T> auto(fieldName: String): AutoField<T>

Declares a child AutoField named fieldName, modeling the auto field type.

Link copied to clipboard
inline fun <T> binary(fieldName: String): BinaryField<T>

Declares a child BinaryField named fieldName, modeling the binary field type.

Link copied to clipboard
inline fun <T> boolean(fieldName: String): BooleanField<T>

Declares a child BooleanField named fieldName, modeling the boolean field type.

Link copied to clipboard
inline fun <T> byte(fieldName: String): ByteField<T>

Declares a child ByteField named fieldName, modeling the byte field type.

Link copied to clipboard
inline fun <T> completion(fieldName: String): CompletionField<T>

Declares a child CompletionField named fieldName, modeling the completion field type.

Link copied to clipboard
inline fun <T> constantKeyword(fieldName: String): ConstantKeywordField<T>

Declares a child ConstantKeywordField named fieldName, modeling the constant_keyword field type.

Link copied to clipboard
inline fun <T> date(fieldName: String, formats: List<DateFormat> = emptyList()): DateField<T>

Declares a child DateField named fieldName, modeling the date field type.

Link copied to clipboard
inline fun <T> dateNanos(fieldName: String): DateNanosField<T>

Declares a child DateNanosField named fieldName, modeling the date_nanos field type.

Link copied to clipboard
inline fun <T> dateRange(fieldName: String): DateRangeField<T>

Declares a child DateRangeField named fieldName, modeling the date_range field type.

Link copied to clipboard
inline fun <T> denseVector(fieldName: String): DenseVectorField<T>

Declares a child DenseVectorField named fieldName, modeling the dense_vector field type.

Link copied to clipboard
inline fun <T> double(fieldName: String): DoubleField<T>

Declares a child DoubleField named fieldName, modeling the double field type.

Link copied to clipboard
inline fun <T> doubleRange(fieldName: String): DoubleRangeField<T>

Declares a child DoubleRangeField named fieldName, modeling the double_range field type.

Link copied to clipboard
fun fieldBy(path: String): Metamodel<*>?

Resolves a dot-separated path relative to this container to the Metamodel field it designates, or null if no field matches the path.

Link copied to clipboard
fun fieldClass(): KClass<out T & Any>?

Returns the KClass for this field's type, or null if the type is not a concrete class (e.g., if it's a type parameter or complex type intersection).

Link copied to clipboard

Returns the Kotlin KType carried by this field, as captured at generation time.

Link copied to clipboard
inline fun <T> flattened(fieldName: String): FlattenedField<T>

Declares a child FlattenedField named fieldName, modeling the flattened field type.

Link copied to clipboard
inline fun <T> float(fieldName: String): FloatField<T>

Declares a child FloatField named fieldName, modeling the float field type.

Link copied to clipboard
inline fun <T> floatRange(fieldName: String): FloatRangeField<T>

Declares a child FloatRangeField named fieldName, modeling the float_range field type.

Link copied to clipboard
inline fun <T> halfFloat(fieldName: String): HalfFloatField<T>

Declares a child HalfFloatField named fieldName, modeling the half_float field type.

Link copied to clipboard
inline fun <T> integer(fieldName: String): IntegerField<T>

Declares a child IntegerField named fieldName, modeling the integer field type.

Link copied to clipboard
inline fun <T> integerRange(fieldName: String): IntegerRangeField<T>

Declares a child IntegerRangeField named fieldName, modeling the integer_range field type.

Link copied to clipboard
inline fun <T> ip(fieldName: String): IpField<T>

Declares a child IpField named fieldName, modeling the ip field type.

Link copied to clipboard
inline fun <T> ipRange(fieldName: String): IpRangeField<T>

Declares a child IpRangeField named fieldName, modeling the ip_range field type.

Link copied to clipboard

Returns true if this container is mapped as a nested object in Elasticsearch.

Link copied to clipboard

Returns true if any ancestor container is marked as nested in Elasticsearch.

Link copied to clipboard
inline fun <T> keyword(fieldName: String): KeywordField<T>

Declares a child KeywordField named fieldName, modeling the keyword field type.

Link copied to clipboard
inline fun <T> long(fieldName: String): LongField<T>

Declares a child LongField named fieldName, modeling the long field type.

Link copied to clipboard
inline fun <T> longRange(fieldName: String): LongRangeField<T>

Declares a child LongRangeField named fieldName, modeling the long_range field type.

Link copied to clipboard
inline fun <T> matchOnlyText(fieldName: String): MatchOnlyTextField<T>

Declares a child MatchOnlyTextField named fieldName, modeling the match_only_text field type.

Link copied to clipboard
inline fun <T> murmur3(fieldName: String): Murmur3Field<T>

Declares a child Murmur3Field named fieldName, modeling the murmur3 field type.

Link copied to clipboard
fun name(): String

Returns the local Elasticsearch field name, without any parent path segments.

Link copied to clipboard

Returns the paths of the ancestor containers that are marked as nested, closest first.

Link copied to clipboard
open override fun parent(): ObjectField<*>?

Returns the direct parent container in the metamodel hierarchy, or null for a root.

Link copied to clipboard

Returns the sequence of ancestor containers, starting with the direct parent.

Link copied to clipboard
fun path(): String

Returns the dot-separated Elasticsearch path of this field, built from its ancestor chain.

Link copied to clipboard
inline fun <T> percolator(fieldName: String): PercolatorField<T>

Declares a child PercolatorField named fieldName, modeling the percolator field type.

Link copied to clipboard
inline fun <T> point(fieldName: String): PointField<T>

Declares a child PointField named fieldName, modeling the point field type.

Link copied to clipboard
inline fun <T> rankFeature(fieldName: String): RankFeatureField<T>

Declares a child RankFeatureField named fieldName, modeling the rank_feature field type.

Link copied to clipboard
inline fun <T> rankFeatures(fieldName: String): RankFeaturesField<T>

Declares a child RankFeaturesField named fieldName, modeling the rank_features field type.

Link copied to clipboard
inline fun <T> scaledFloat(fieldName: String): ScaledFloatField<T>

Declares a child ScaledFloatField named fieldName, modeling the scaled_float field type.

Link copied to clipboard
inline fun <T> searchAsYouType(fieldName: String): SearchAsYouTypeField<T>

Declares a child SearchAsYouTypeField named fieldName, modeling the search_as_you_type field type.

Link copied to clipboard
inline fun <T> shape(fieldName: String): ShapeField<T>

Declares a child ShapeField named fieldName, modeling the shape field type.

Link copied to clipboard
inline fun <T> short(fieldName: String): ShortField<T>

Declares a child ShortField named fieldName, modeling the short field type.

Link copied to clipboard
inline fun <T> text(fieldName: String): TextField<T>

Declares a child TextField named fieldName, modeling the text field type.

Link copied to clipboard
inline fun <T> tokenCount(fieldName: String): TokenCountField<T>

Declares a child TokenCountField named fieldName, modeling the token_count field type.

Link copied to clipboard
inline fun <T> version(fieldName: String): VersionField<T>

Declares a child VersionField named fieldName, modeling the version field type.

Link copied to clipboard
inline fun <T> wildcard(fieldName: String): WildcardField<T>

Declares a child WildcardField named fieldName, modeling the wildcard field type.