Created
August 22, 2017 15:14
-
-
Save xeraa/19f8778856aaa892c936da5ce1da4a77 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE my_index | |
PUT my_index | |
{ | |
"mappings": { | |
"my_type": { | |
"properties": { | |
"last_viewed": { | |
"type": "date", | |
"format": "dd/MM/YYYY||YYYY/MM/dd" | |
} | |
} | |
} | |
} | |
} | |
POST my_index/my_type | |
{ | |
"last_viewed": "20/10/2017" | |
} | |
POST my_index/my_type | |
{ | |
"last_viewed": "25/10/2017" | |
} | |
GET /my_index/_search | |
{ | |
"query": { | |
"range": { | |
"last_viewed": { | |
"gte": "2017/10/15", | |
"lte": "2017/10/21" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment