Package-level declarations

Types

Link copied to clipboard
abstract class BaseDateTimeType<V> : SimpleFieldType<V>

Base class for date types. Core module doesn't provide any specific implementations. One of implementation you can find inside kotlinx-datetime module.

Link copied to clipboard

Represents boolean values.

Link copied to clipboard

Integer field type represents signed integer value from Byte.MIN_VALUE to Byte.MAX_VALUE.

Link copied to clipboard

A range of double-precision floating point values.

Link copied to clipboard

Double field type represents double-precision floating point value.

Link copied to clipboard
class EnumFieldType<V : Enum<V>>(enumValues: Array<V>, fieldValue: EnumValue<V, *>, type: FieldType<*, *>, val termType: KClass<*>) : SimpleFieldType<V>

A field type that transforms enum variants to field values and vice verse.

Link copied to clipboard
fun interface EnumValue<V : Enum<V>, T>

An interface that provides field value for an enum. We need this interface hierarchy to be able to make multiple enum extension functions without signature clashing.

Link copied to clipboard
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.

Link copied to clipboard

A range of single-precision floating point values.

Link copied to clipboard

Float field type represents single-precision floating point value.

Link copied to clipboard
fun interface IntEnumValue<V : Enum<V>> : EnumValue<V, Int>

An interface that provides integer field value for an enum.

Link copied to clipboard

A range of signed 32-bit integers.

Link copied to clipboard

Integer field type represents signed integer value from Int.MIN_VALUE to Int.MAX_VALUE.

Link copied to clipboard
data class Join(val name: String, val parent: String? = null)

Join field value.

Link copied to clipboard

Join field type represents parent-child relations between documents in an index.

Link copied to clipboard
fun interface KeywordEnumValue<V : Enum<V>> : EnumValue<V, String>

An interface that provides string field value for an enum.

Link copied to clipboard

Keyword field type is used for not-analyzed strings.

Link copied to clipboard

A range of signed 64-bit integers.

Link copied to clipboard

Long field type represents signed integer value from Long.MIN_VALUE to Long.MAX_VALUE.

Link copied to clipboard

Nested field type allows indexing array of objects as separate documents.

Link copied to clipboard
abstract class NumberType<V : Number> : SimpleFieldType<V>

Base class for numeric field types.

Link copied to clipboard

Object field type is used to represent sub-documents.

Link copied to clipboard
class OptionalListType<V, T>(val type: FieldType<V, T>) : FieldType<MutableList<V?>, T>

Serializes/deserializes type into list of optional values. Used by dev.evo.elasticmagic.doc.DocSource.

Link copied to clipboard
data class Range<V>(val gt: V? = null, val gte: V? = null, val lt: V? = null, val lte: V? = null)

A class that represents field value for range types.

Link copied to clipboard
abstract class RangeType<V>(type: FieldType<V, V>) : FieldType<Range<V>, V>

A base class for range field types.

Link copied to clipboard
class RequiredListType<V, T>(val type: FieldType<V, T>) : FieldType<MutableList<V & Any>, T>

Serializes/deserializes type into list of required values. Used by dev.evo.elasticmagic.doc.DocSource.

Link copied to clipboard

Integer field type represents signed integer value from Short.MIN_VALUE to Short.MAX_VALUE.

Link copied to clipboard
abstract class SimpleFieldType<V> : FieldType<V, V>

Base field type for types with the same field and term value types.

Link copied to clipboard

Serializes/deserializes type into list of values. Might be used in aggregations.

Link copied to clipboard
abstract class StringType : SimpleFieldType<String>

Base class for string types.

Link copied to clipboard

Text field type is used for full-text search.

Link copied to clipboard

An exception for deserialization errors.

Link copied to clipboard

An exception for serialization errors.

Functions

Link copied to clipboard
fun deErr(v: Any?, type: String, cause: Throwable? = null): Nothing

A shortcut to throw ValueDeserializationException.

Link copied to clipboard
fun serErr(v: Any?, cause: Throwable? = null): Nothing

A shortcut to throw ValueSerializationException.