Document

abstract class Document(options: MappingOptions) : DynamicTemplates

Base class for describing a top level Elasticsearch document.

Constructors

Document
Link copied to clipboard
fun Document(dynamic: Dynamic? = null, numericDetection: Boolean? = null, dateDetection: Boolean? = null, dynamicDateFormats: List<String>? = null)
Document
Link copied to clipboard
fun Document(options: MappingOptions = MappingOptions())

Types

RuntimeField
Link copied to clipboard
class RuntimeField<V>(name: String?, type: FieldType<V, V>, script: Script)

Functions

boolean
Link copied to clipboard
fun boolean(name: String? = null, docValues: Boolean? = null, index: Boolean? = null, store: Boolean? = null, params: Params? = null): FieldSet.Field<Boolean, Boolean>
byte
Link copied to clipboard
fun byte(name: String? = null, docValues: Boolean? = null, index: Boolean? = null, store: Boolean? = null, params: Params? = null): FieldSet.Field<Byte, Byte>
double
Link copied to clipboard
fun double(name: String? = null, docValues: Boolean? = null, index: Boolean? = null, store: Boolean? = null, params: Params? = null): FieldSet.Field<Double, Double>
field
Link copied to clipboard
fun <V, T> field(type: FieldType<V, T>, docValues: Boolean? = null, index: Boolean? = null, store: Boolean? = null, params: Params? = null): FieldSet.Field<V, T>
fun <V, T> field(name: String?, type: FieldType<V, T>, docValues: Boolean? = null, index: Boolean? = null, store: Boolean? = null, params: Params? = null): FieldSet.Field<V, T>
float
Link copied to clipboard
fun float(name: String? = null, docValues: Boolean? = null, index: Boolean? = null, store: Boolean? = null, params: Params? = null): FieldSet.Field<Float, Float>
get
Link copied to clipboard
operator fun get(name: String): MappingField<*>?
getAllFields
Link copied to clipboard
fun getAllFields(): Collection<MappingField<*>>
getAllTemplates
Link copied to clipboard
fun getAllTemplates(): Collection<BoundMappingTemplate<*, *, *>>
getFieldByName
Link copied to clipboard
inline fun <T> getFieldByName(name: String): MappingField<T>
getFieldName
Link copied to clipboard
open override fun getFieldName(): String
getQualifiedFieldName
Link copied to clipboard
open override fun getQualifiedFieldName(): String
getTemplate
Link copied to clipboard
fun getTemplate(name: String): BoundMappingTemplate<*, *, *>?
int
Link copied to clipboard
fun int(name: String? = null, docValues: Boolean? = null, index: Boolean? = null, store: Boolean? = null, params: Params? = null): FieldSet.Field<Int, Int>
join
Link copied to clipboard
fun join(name: String? = null, relations: Map<String, List<String>>, eagerGlobalOrdinals: Boolean? = null): FieldSet.JoinField
keyword
Link copied to clipboard
fun keyword(name: String? = null, normalizer: String? = null, docValues: Boolean? = null, index: Boolean? = null, store: Boolean? = null, params: Params? = null): FieldSet.Field<String, String>
long
Link copied to clipboard
fun long(name: String? = null, docValues: Boolean? = null, index: Boolean? = null, store: Boolean? = null, params: Params? = null): FieldSet.Field<Long, Long>
nested
Link copied to clipboard
fun <T : SubDocument> nested(factory: (DocSourceField) -> T, dynamic: Dynamic? = null, params: Params = Params()): SubDocument.UnboundSubDocument<T>
fun <T : SubDocument> nested(name: String?, factory: (DocSourceField) -> T, dynamic: Dynamic? = null, params: Params = Params()): SubDocument.UnboundSubDocument<T>
obj
Link copied to clipboard
fun <T : SubDocument> obj(factory: (DocSourceField) -> T, enabled: Boolean? = null, dynamic: Dynamic? = null, params: Params = Params()): SubDocument.UnboundSubDocument<T>
fun <T : SubDocument> obj(name: String?, factory: (DocSourceField) -> T, enabled: Boolean? = null, dynamic: Dynamic? = null, params: Params = Params()): SubDocument.UnboundSubDocument<T>
object
Link copied to clipboard
fun <T : SubDocument> object(factory: (DocSourceField) -> T, enabled: Boolean? = null, dynamic: Dynamic? = null, params: Params = Params()): SubDocument.UnboundSubDocument<T>
fun <T : SubDocument> object(name: String?, factory: (DocSourceField) -> T, enabled: Boolean? = null, dynamic: Dynamic? = null, params: Params = Params()): SubDocument.UnboundSubDocument<T>
runtime
Link copied to clipboard
fun <V> runtime(type: FieldType<V, V>, script: Script): Document.RuntimeField<V>
fun <V> runtime(name: String, type: FieldType<V, V>, script: Script): Document.RuntimeField<V>
short
Link copied to clipboard
fun short(name: String? = null, docValues: Boolean? = null, index: Boolean? = null, store: Boolean? = null, params: Params? = null): FieldSet.Field<Short, Short>
subFields
Link copied to clipboard
fun <V, F : SubFields<V>> FieldSet.Field<V, V>.subFields(factory: (BoundField<V, V>) -> F): SubFields.UnboundSubFields<V, F>
template
Link copied to clipboard
fun template(name: String? = null, mapping: DynamicTemplates.Mapping, match: String? = null, unmatch: String? = null, pathMatch: String? = null, pathUnmatch: String? = null, matchPattern: DynamicTemplates.MatchPattern? = null, params: Params? = null): DynamicTemplates.MappingTemplate<Any, Any, BoundField<Any, Any>>
Template without field type.
fun template(name: String? = null, runtime: DynamicTemplates.Runtime.Simple, match: String? = null, unmatch: String? = null, pathMatch: String? = null, pathUnmatch: String? = null, matchPattern: DynamicTemplates.MatchPattern? = null, params: Params? = null): DynamicTemplates.MappingTemplate<Any, Any, BoundField<Any, Any>>
Template for a runtime field.
fun <V, T> template(name: String? = null, mapping: DynamicTemplates.Mapping, matchMappingType: DynamicTemplates.MatchMappingType<V, T>, match: String? = null, unmatch: String? = null, pathMatch: String? = null, pathUnmatch: String? = null, matchPattern: DynamicTemplates.MatchPattern? = null, params: Params? = null): DynamicTemplates.MappingTemplate<V, T, BoundField<V, T>>
Template with field type detected by JSON parser.
fun <V, T> template(name: String? = null, runtime: DynamicTemplates.Runtime.Simple, matchMappingType: DynamicTemplates.MatchMappingType<V, T>, match: String? = null, unmatch: String? = null, pathMatch: String? = null, pathUnmatch: String? = null, matchPattern: DynamicTemplates.MatchPattern? = null, params: Params? = null): DynamicTemplates.MappingTemplate<V, T, BoundField<V, T>>
Template for a runtime field which type is detected by a JSON parser.
fun <V, T> template(name: String? = null, runtime: DynamicTemplates.Runtime.Typed<V, T>, matchMappingType: DynamicTemplates.MatchMappingType<*, *>? = null, match: String? = null, unmatch: String? = null, pathMatch: String? = null, pathUnmatch: String? = null, matchPattern: DynamicTemplates.MatchPattern? = null, params: Params? = null): DynamicTemplates.MappingTemplate<V, T, BoundField<V, T>>
Template for a runtime field with a specified type.
fun <V, T> template(name: String? = null, mapping: FieldSet.Field<V, T>, matchMappingType: DynamicTemplates.MatchMappingType<*, *>? = null, match: String? = null, unmatch: String? = null, pathMatch: String? = null, pathUnmatch: String? = null, matchPattern: DynamicTemplates.MatchPattern? = null, params: Params? = null): DynamicTemplates.MappingTemplate<V, T, BoundField<V, T>>
Template with field type from mapping.
fun <F : SubDocument> template(name: String? = null, mapping: SubDocument.UnboundSubDocument<F>, matchMappingType: DynamicTemplates.MatchMappingType<*, *>? = null, match: String? = null, unmatch: String? = null, pathMatch: String? = null, pathUnmatch: String? = null, matchPattern: DynamicTemplates.MatchPattern? = null, params: Params? = null): DynamicTemplates.MappingTemplate<Any, Nothing, F>
Template for a sub-document field.
fun <V, F : SubFields<V>> template(name: String? = null, mapping: SubFields.UnboundSubFields<V, F>, matchMappingType: DynamicTemplates.MatchMappingType<*, *>? = null, match: String? = null, unmatch: String? = null, pathMatch: String? = null, pathUnmatch: String? = null, matchPattern: DynamicTemplates.MatchPattern? = null, params: Params? = null): DynamicTemplates.MappingTemplate<V, V, F>
Template for a field with sub-fields.
text
Link copied to clipboard
fun text(name: String? = null, index: Boolean? = null, indexOptions: String? = null, store: Boolean? = null, norms: Boolean? = null, boost: Double? = null, analyzer: String? = null, searchAnalyzer: String? = null, params: Params? = null): FieldSet.Field<String, String>
toValue
Link copied to clipboard
open override fun toValue(): String

Properties

meta
Link copied to clipboard
open val meta: MetaFields
options
Link copied to clipboard
val options: MappingOptions
runtime
Link copied to clipboard
val runtime: RuntimeFields