Created
November 11, 2020 13:14
-
-
Save kenoir/8ee0f4b0aa4a5e7e86a54060e977a1fb to your computer and use it in GitHub Desktop.
Count the documents in which a field exists in Elasticsearch using curl
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 -s localhost:9200/chunks/_count -H 'Content-Type: application/json' -d '{"query": { "bool": { "must": [{"exists":{"field":"transfer_package"}}] } } }' | jq ".count" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment