Skip to content

Instantly share code, notes, and snippets.

@pgporada
Created May 5, 2015 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgporada/8ab3f0f1b70248a7b1b9 to your computer and use it in GitHub Desktop.
Save pgporada/8ab3f0f1b70248a7b1b9 to your computer and use it in GitHub Desktop.
ElasticSearch query
#!/usr/bin/env bash
IP=localhost
for INDEX in $(curl -s $IP:9200/_cat/indices?v | awk '{print $3}' | grep logstash-); do
curl -s -X GET $IP:9200/$INDEX/tripdata/_search?pretty -d '
{
"query": {
"bool": {
"must_not": [
{ "match": { "MYFIELD": "352252060022408" } },
{ "match": { "MYFIELD": "352252060022432" } }
]
}
}
}'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment