른록노트

[Elasticsearch] 데이터타입 본문

DB/[Elasticsearch]

[Elasticsearch] 데이터타입

른록 2017. 8. 22. 13:48

Field datatypesedit

Elasticsearch supports a number of different datatypes for the fields in a document:

Core datatypesedit

string
text and keyword
Numeric datatypes
longintegershortbytedoublefloathalf_floatscaled_float
Date datatype
date
Boolean datatype
boolean
Binary datatype
binary
Range datatypes
integer_rangefloat_rangelong_rangedouble_rangedate_range

Complex datatypesedit

Array datatype
Array support does not require a dedicated type
Object datatype
object for single JSON objects
Nested datatype
nested for arrays of JSON objects

Geo datatypesedit

Geo-point datatype
geo_point for lat/lon points
Geo-Shape datatype
geo_shape for complex shapes like polygons

Specialised datatypesedit

IP datatype
ip for IPv4 and IPv6 addresses
Completion datatype
completion to provide auto-complete suggestions
Token count datatype
token_count to count the number of tokens in a string
mapper-murmur3
murmur3 to compute hashes of values at index-time and store them in the index
Attachment datatype
See the mapper-attachments plugin which supports indexing attachments like Microsoft Office formats, Open Document formats, ePub, HTML, etc. into an attachment datatype.
Percolator type
Accepts queries from the query-dsl

Multi-fieldsedit

It is often useful to index the same field in different ways for different purposes. For instance, a string field could be mapped as a text field for full-text search, and as a keyword field for sorting or aggregations. Alternatively, you could index a text field with the standard analyzer, the englishanalyzer, and the french analyzer.

This is the purpose of multi-fields. Most datatypes support multi-fields via the fields parameter.


참고사이트

https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html

반응형
Comments