Package dev.evo.elasticmagic.types

Types

BaseDateTimeType
Link copied to clipboard
abstract class BaseDateTimeType<V> : SimpleFieldType<V>
Base class for date types.
BooleanType
Link copied to clipboard
object BooleanType : SimpleFieldType<Boolean>
Represents boolean values.
ByteType
Link copied to clipboard
object ByteType : NumberType<Byte>
Integer field type represents signed integer value from Byte.MIN_VALUE to Byte.MAX_VALUE.
DoubleRangeType
Link copied to clipboard
object DoubleRangeType : RangeType<Double>
A range of double-precision floating point values.
DoubleType
Link copied to clipboard
object DoubleType : NumberType<Double>
Double field type represents double-precision floating point value.
EnumFieldType
Link copied to clipboard
class EnumFieldType<V : Enum<V>>(enumValues: Array<V>, fieldValue: EnumValue<V, *>, type: FieldType<*, *>, termType: KClass<*>) : SimpleFieldType<V>
A field type that transforms enum variants to field values and vice verse.
EnumValue
Link copied to clipboard
fun fun interface EnumValue<V : Enum<V>, T>
An interface that provides field value for an enum.
FieldType
Link copied to clipboard
interface FieldType<V, T>
A field type is responsible for serialization/deserialization of document and term values.
FloatRangeType
Link copied to clipboard
object FloatRangeType : RangeType<Float>
A range of single-precision floating point values.
FloatType
Link copied to clipboard
object FloatType : NumberType<Float>
Float field type represents single-precision floating point value.
IntEnumValue
Link copied to clipboard
fun fun interface IntEnumValue<V : Enum<V>> : EnumValue<V, Int>
An interface that provides integer field value for an enum.
IntRangeType
Link copied to clipboard
object IntRangeType : RangeType<Int>
A range of signed 32-bit integers.
IntType
Link copied to clipboard
object IntType : NumberType<Int>
Integer field type represents signed integer value from Int.MIN_VALUE to Int.MAX_VALUE.
Join
Link copied to clipboard
data class Join(name: String, parent: String?)
Join field value.
JoinType
Link copied to clipboard
object JoinType : FieldType<Join, String>
Join field type represents parent-child relations between documents in an index.
KeywordEnumValue
Link copied to clipboard
fun fun interface KeywordEnumValue<V : Enum<V>> : EnumValue<V, String>
An interface that provides string field value for an enum.
KeywordType
Link copied to clipboard
object KeywordType : StringType
Keyword field type is used for not-analyzed strings.
LongRangeType
Link copied to clipboard
object LongRangeType : RangeType<Long>
A range of signed 64-bit integers.
LongType
Link copied to clipboard
object LongType : NumberType<Long>
Long field type represents signed integer value from Long.MIN_VALUE to Long.MAX_VALUE.
NestedType
Link copied to clipboard
class NestedType<V : BaseDocSource> : ObjectType<V>
Nested field type allows indexing array of objects as separate documents.
NumberType
Link copied to clipboard
abstract class NumberType<V : Number> : SimpleFieldType<V>
Base class for numeric field types.
ObjectType
Link copied to clipboard
open class ObjectType<V : BaseDocSource> : FieldType<V, Nothing>
Object field type is used to represent sub-documents.
Range
Link copied to clipboard
data class Range<V>(gt: V?, gte: V?, lt: V?, lte: V?)
A class that represents field value for range types.
RangeType
Link copied to clipboard
abstract class RangeType<V>(type: FieldType<V, V>) : FieldType<Range<V>, V>
A base class for range field types.
ShortType
Link copied to clipboard
object ShortType : NumberType<Short>
Integer field type represents signed integer value from Short.MIN_VALUE to Short.MAX_VALUE.
SimpleFieldType
Link copied to clipboard
abstract class SimpleFieldType<V> : FieldType<V, V>
Base field type for types with the same field and term value types.
StringType
Link copied to clipboard
abstract class StringType : SimpleFieldType<String>
Base class for string types.
TextType
Link copied to clipboard
object TextType : StringType
Text field type is used for full-text search.
ValueDeserializationException
Link copied to clipboard
class ValueDeserializationException(value: Any, type: String, cause: Throwable?)
An exception for deserialization errors.
ValueSerializationException
Link copied to clipboard
class ValueSerializationException(value: Any?, cause: Throwable?)
An exception for serialization errors.

Functions

deErr
Link copied to clipboard
fun deErr(v: Any, type: String, cause: Throwable? = null): Nothing
A shortcut to throw ValueDeserializationException.
serErr
Link copied to clipboard
fun serErr(v: Any?, cause: Throwable? = null): Nothing
A shortcut to throw ValueSerializationException.