른록노트
[Elasticsearch] 데이터타입 본문
Field datatypesedit
Elasticsearch supports a number of different datatypes for the fields in a document:
Core datatypesedit
- string
textandkeyword- Numeric datatypes
long,integer,short,byte,double,float,half_float,scaled_float- Date datatype
date- Boolean datatype
boolean- Binary datatype
binary- Range datatypes
integer_range,float_range,long_range,double_range,date_range
Complex datatypesedit
- Array datatype
- Array support does not require a dedicated
type - Object datatype
objectfor single JSON objects- Nested datatype
nestedfor arrays of JSON objects
Geo datatypesedit
- Geo-point datatype
geo_pointfor lat/lon points- Geo-Shape datatype
geo_shapefor complex shapes like polygons
Specialised datatypesedit
- IP datatype
ipfor IPv4 and IPv6 addresses- Completion datatype
completionto provide auto-complete suggestions- Token count datatype
token_countto count the number of tokens in a stringmapper-murmur3murmur3to compute hashes of values at index-time and store them in the index- Attachment datatype
- See the
mapper-attachmentsplugin which supports indexingattachmentslike Microsoft Office formats, Open Document formats, ePub, HTML, etc. into anattachmentdatatype. - 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