Created
March 21, 2013 18:09
-
-
Save rkroll/5215263 to your computer and use it in GitHub Desktop.
ES-array-field-query
This file contains 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 -XPUT 'http://localhost:9200/demo/index/loc' -d '{ | |
"locations" : [ | |
"Oakland Park, FLORIDA", | |
"33309", | |
"Florida" | |
] | |
}' | |
curl -XGET 'http://localhost:9200/demo/_search?' -d ' | |
{ | |
"from": 0, | |
"size": 25, | |
"query": { | |
"filtered": { | |
"query": { | |
"match_all": {} | |
}, | |
"filter": { | |
"query": { | |
"bool": { | |
"should": { | |
"field": { | |
"locations": "\"Florida\"" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment