Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Anti-phrasing
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