I am using Java21, SpringBoot and Elasticsearch. I have documents in Elasticsearch index. This index must be as much reliable as possible and sometimes retunrs not matching results or nothing depending on server state. My question is how u would defined the index health ?
Check if ES is on, Comparing documents count to db count. This could be nice second step..
I am using Java21, SpringBoot and Elasticsearch. I have documents in Elasticsearch index. This index must be as much reliable as possible and sometimes retunrs not matching results or nothing depending on server state. My question is how u would defined the index health ?
Check if ES is on, Comparing documents count to db count. This could be nice second step..
Share Improve this question edited Mar 13 at 10:30 SereneAtk asked Mar 11 at 12:32 SereneAtkSereneAtk 1236 bronze badges1 Answer
Reset to default 1Comparing documents count to db count. This could be nice second step
That's what I was doing in the past. During the night, I was running batches (reports) to check at least that the number of docs per month was accurate.
That's from a functional point of view.
From a technical perspective, I'd just rely on what the _search
API gives back:
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
}
If there's something in failed
, then I'd warn the user. Otherwise I'd assume that the data is correct.
My 2 cents
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744794949a4594150.html
评论列表(0条)