-
-
Save newthinker/93a8c46a581e69207aa4 to your computer and use it in GitHub Desktop.
Range query example
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
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