Here is my search query used in python to find error count.
res = es.search(index="qvs-data", timeout=50000, body={
"highlight":{"pre_tags":["@kibana-highlighted-field@"],
"post_tags":["@/kibana-highlighted-field@"],
"fields":{"":{}},"fragment_size":2147483647},
"query":{"filtered":{"query":{"query_string":{"query":"","analyze_wildcard":"true","allow_leading_wildcard":"false"}},
"filter":{"bool":{"must":[{"query":{"match":{"boardName":{"query":"p2379a","type":"phrase"}}}},
{"query":{"match":{"tag":{"query":"pll_NOT_LOCKED","type":"phrase"}}}},
{"query":{"match":{"os":{"query":"multios","type":"phrase"}}}},
{"range":{"timestamp":{"gte":startTime,"lte":"now"}}}],"must_not":[]}}}},
"fields":["*","_source"],"script_fields":{"origin":{"script":"0","lang":"expression"},"_count":{"script":"1","lang":"expression"}},"fielddata_fields":["timestamp"]})
return res['hits']['total']
I want to find error count for tag in case insensitive.
If tag is "pll_NOT_LOCKED" error count is 12
then for tag "PLL_NOT_LOCKED" error count should be 12