I have downloaded a sample accounts json database from the elasticsearch website.https://www.elastic.co/guide/en/elasticsearch/reference/current/_exploring_your_data.html
I am trying to do some queries on top of it.
For example,
curl -XGET 'http://localhost:9200/bank/account/_count?pretty' -d '{
"query":{
"filtered":{
"filter":{
"bool":{
"should":[{"term":{"gender":"M"}},{"term":{"age":35}}]
}
}
}
}
}'
getting the output for this correctly with the count.
But If I try like the query below, I am not getting the correct result.
curl -XGET 'http://localhost:9200/bank/account/_count?pretty' -d '{
"query":{
"filtered":{
"filter":{
"bool":{
"should":[{"term":{"gender":"F"}},{"term":{"state":"PA"}}]
}
}
}
}
}'
I am not getting the correct result.. Is there anything wrong in the query syntax or the way of using it?
Can anyone help here!