FieldType

interface FieldType<V, T>

A field type is responsible for serialization/deserialization of document and term values. Term values are used in queries, aggregations etc.

Parameters

V

the type of field value.

T

the type of term value.

Inheritors

Properties

Link copied to clipboard
abstract val name: String

Name of Elasticsearch mapping type.

Link copied to clipboard
abstract val termType: KClass<*>

Term class is used inside FieldSet.getFieldByName method to check term type before casting.

Functions

Link copied to clipboard
abstract fun deserialize(v: Any, valueFactory: () -> V? = null): V & Any

Deserializes field value from Elasticsearch.

Link copied to clipboard
abstract fun deserializeTerm(v: Any): T & Any

Deserializes term value from Elasticsearch.

Link copied to clipboard
open fun params(): Params
Link copied to clipboard
open fun serialize(v: V & Any): Any

Serializes field value to Elasticsearch.

Link copied to clipboard
open fun serializeTerm(v: T & Any): Any

Serializes term value to Elasticsearch.