search* query randomly returns empty results
Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the Amplify Console GitHub Issue Tracker
Describe the bug
search* query randomly returns empty results.
Amplify CLI Version
4.18.0
To Reproduce
I am unsure how to reproduce this, I simply run the same query over and over again and get a seemingly random result between empty and not empty.
Expected behavior
Should be consistent.
Screenshots

Desktop (please complete the following information):
- OS: N/A
- Node Version: N/A
Additional context
This env was newly created.
I tried removing the arguments given to the query, still able to replicate it.
One way is to turn on the Elasticsearch Cloudwatch logs to see if there are any errors. Another is to look at the Elasticsearch endpoint's status. There could be many reasons why it fails (not enough nodes, hardware failure, unusual pressure etc). It happened to me once where the status was Pending and there was a hardware failure which the elasticsearch was trying to recover itself. After a while it started working again.
One way is to turn on the Elasticsearch Cloudwatch logs to see if there are any errors. Another is to look at the Elasticsearch endpoint's status. There could be many reasons why it fails (not enough nodes, hardware failure, unusual pressure etc). It happened to me once where the status was Pending and there was a hardware failure which the elasticsearch was trying to recover itself. After a while it started working again.
Thanks for the advice. I will try this and report back what I may find or if I failed to do it.
I agree with @Blkc I think this is dependency issue here. I would recommend reaching out to AppSync for further help if you are still experiencing this issue.
Closing as there is no actionable item on CLI.
I'm having a similar issue. Where you able to resolve it? Looking at the logs when it returns an empty response I see the following, where there is a total number of result >0 but the hits array is empty.
"result": {
"took": 1,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 26,
"hits": []
}
},
"stash": {},
"outErrors": []
@KIWI-JP No, I didn't have to, it just went away for some weird reasons. Sorry, I can't verify if it's happening now, I'm on a different project at the moment.
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.