Skip to content

Instantly share code, notes, and snippets.

@zapnap
Forked from jprante/rangequery.sh
Created February 19, 2014 16:26
Show Gist options
  • Save zapnap/9095587 to your computer and use it in GitHub Desktop.
Save zapnap/9095587 to your computer and use it in GitHub Desktop.
curl -XDELETE 'localhost:9200/test'
curl -XPUT 'localhost:9200/test/data/1' -d '
{
"numbers":[11,23,13,16,17,23.6]
},
'
curl -XPUT 'localhost:9200/test/data/2' -d '
{
"numbers":[1,2,3,4,5,6,7,8,8.9,9.1,9.4]
}
'
curl -XPUT 'localhost:9200/test/data/3' -d '
{
"numbers":[101,230,150,200]
}
'
curl -XGET 'localhost:9200/test/_refresh'
curl -XGET 'localhost:9200/test/_search?pretty' -d '
{
"query" : {
"range": {
"numbers": { "gt" : 10, "lt" : 23.9 }
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment