Created
October 3, 2013 20:24
-
-
Save jprante/6816555 to your computer and use it in GitHub Desktop.
Anti-phrasing
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 -XDELETE 'http://127.0.0.1:9200/test' | |
curl -XPOST 'http://127.0.0.1:9200/test/country' -d '{ "country": ["United States"]}' | |
curl -XPOST 'http://127.0.0.1:9200/test/province' -d '{ "country": ["United States"],"province" : "NY"}' | |
curl -XPOST 'http://127.0.0.1:9200/test/city' -d '{ "country": ["United States"],"province" : "NY", "city" : "Albany"}' | |
curl -XPOST 'http://127.0.0.1:9200/test/district' -d '{ "country": ["United States"],"province" : "NY","city" : "Albany","district" : "West Albany"}' | |
curl -XPOST 'http://127.0.0.1:9200/test/district' -d '{ "country": ["United States"],"province" : "NY","city" : "Albany","district" : "Albany Center"}' | |
curl -XPOST 'http://127.0.0.1:9200/test/district' -d '{ "country": ["United States"],"province" : "NY","city" : "Albany","district" : "Shopping District"}' | |
curl -XPOST 'http://127.0.0.1:9200/test/district' -d '{ "country": ["United States"],"province" : "NY","city" : "Albany","district" : "Empirical Mile"}' | |
curl -XGET 'http://127.0.0.1:9200/test/_refresh' | |
curl -XGET 'http://127.0.0.1:9200/test/_search?pretty' -d ' | |
{ | |
"query" : { | |
"query_string" : { "query" : "Albany NY" } | |
}, | |
"filter" : { | |
"query" : { | |
"query_string" : { "query" : "!district:Albany !country:Albany !province:Albany" } | |
} | |
} | |
} | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment