Sie sind auf Seite 1von 6

Date datatype | Elasticsearch Reference [6.0] | Elastic https://www.elastic.co/guide/en/elasticsearch/reference/current/date.

html

"2015-01-01"
"2015/01/01 12:10:30"

date

format

1 de 6 26/11/2017 02:43
Date datatype | Elasticsearch Reference [6.0] | Elastic https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html

"strict_date_optional_time||epoch_millis"

strict_date_optional_time

PUT my_index
{
"mappings": {
"my_type": {
"properties": {
"date": {
"type": "date"
}
}
}
}
}

PUT my_index/my_type/1
{ "date": "2015-01-01" }

PUT my_index/my_type/2
{ "date": "2015-01-01T12:10:30Z" }

PUT my_index/my_type/3
{ "date": 1420070400001 }

GET my_index/_search
{
"sort": { "date": "asc"}
}

COPY AS CURL VIEW IN CONSOLE (HTTP://LOCALHOST:5601


/APP/KIBANA#/DEV_TOOLS/CONSOLE?LOAD_FROM=HTTPS:

//WWW.ELASTIC.CO/GUIDE/EN/ELASTICSEARCH/REFERENCE

2 de 6 26/11/2017 02:43
Date datatype | Elasticsearch Reference [6.0] | Elastic https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html

/CURRENT/SNIPPETS/DATE/1.JSON)

date format

Date datatype
(date.html)

sort

||

PUT my_index
{
"mappings": {
"my_type": {
"properties": {
"date": {
"type": "date", join
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
}
}
}
}
}

COPY AS CURL VIEW IN CONSOLE (HTTP://LOCALHOST:5601

/APP/KIBANA#/DEV_TOOLS/CONSOLE?LOAD_FROM=HTTPS:
//WWW.ELASTIC.CO/GUIDE/EN/ELASTICSEARCH/REFERENCE

/CURRENT/SNIPPETS/DATE/2.JSON)

3 de 6 26/11/2017 02:43
Date datatype | Elasticsearch Reference [6.0] | Elastic https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html

date
date

boost

1.0

doc_values

true false

format

strict_date_optional_time||epoch_millis

locale

ROOT

ignore_malformed true
false

index
true false

null_value
format
null
null

4 de 6 26/11/2017 02:43
Date datatype | Elasticsearch Reference [6.0] | Elastic https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html

store

_source
true false

5 de 6 26/11/2017 02:43
Date datatype | Elasticsearch Reference [6.0] | Elastic https://www.elastic.co/guide/en/elasticsearch/reference/current/date.html

6 de 6 26/11/2017 02:43

Das könnte Ihnen auch gefallen