I am using python to extract data from my Elasticsearch but suddenly started to get this error : TransportError(503, 'search_phase_execution_exception')
. I also have kibana working with the same Elasticsearch and I am able to execute the same query in devTools.
Query
{
"size" : 10000,
"sort": { "timestamp": "desc"},
"_source": ["data.service","data.vpn","data.policyid","data.srccountry1","data.srcip","data.dstip","data.group","data.srcuser","data.tunneltype"],
"query":{
"bool": {
"must": [
{"exists": {"field": "data.service"}},
{"exists": {"field": "data.vpn"}},
{"exists": {"field": "data.policyid"}},
{"exists": {"field": "data.srccountry1"}},
{"exists": {"field": "data.srcip"}},
{"exists": {"field": "data.dstip"}},
{"match_phrase": {"data.action": "accept"}},
{"match_phrase": {"location":host }}
]
}
}
}
And
es.indices.exists(index=today_index_name):
to check if index is there or not.
only 2 queries are being executed by python.
What could be causing this issue? Is this related to SEARCH API which python uses?