Elasticsearch returning empty result

(Gaurav) #1

I am using a 2.3 version elastic search.
Sometimes, elastic search returns an empty result even when data is present.
It usually gives the right data on retry. But why does it return empty in the first try.
Any known issues or pointers which can help me here.

(David Pilato) #2

Could you share the full response when both cases are happening?

BTW 2.3 is super old and not maintained anymore.

(Gaurav) #3

I am using the Jest client for querying the elastic search. The Jest client returns the object for search result which gives me isSucceeded as TRUE. And the data is not present in the search result.
The same query is fired after 10secinds and I get the expected data.
The query that was fired was similar to
{
"query": {
"bool": {
"must": [{
"match": {
"ProgramId": "SampleProgramId"
}
}, {
"match": {
"TraderId": "SampleTrader"
}
}, {
"match": {
"CustomerId": "SampleCustomer"
}
}, {
"match": {
"TradeStatus": "SampleStatus"
}
}],
"filter": [{
"range": {
"TradeStartDate": {
"gte": 123456,
"lte": 654321
}
}
}]
}
}
}

(David Pilato) #4

But is there a way to debug and print what Jest received as the http response and share it please?

(Gaurav) #5

This doesn't happen often. It happened twice in past 20 days. I have anyways put the logs, but not sure about the next occurrence

(David Pilato) #6

I just wanted to know if some shards were failing during that specific search. This is part of the response.