amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

search* query randomly returns empty results

Open aprilmintacpineda opened this issue 6 years ago • 7 comments

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

screencast-ap-southeast-2 console aws amazon com-2020 05 28-07_50_05

Desktop (please complete the following information):

  • OS: N/A
  • Node Version: N/A

Additional context

This env was newly created.

aprilmintacpineda avatar May 28 '20 00:05 aprilmintacpineda

I tried removing the arguments given to the query, still able to replicate it.

aprilmintacpineda avatar May 28 '20 00:05 aprilmintacpineda

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.

blkc avatar May 28 '20 20:05 blkc

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.

aprilmintacpineda avatar May 29 '20 02:05 aprilmintacpineda

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.

SwaySway avatar Aug 05 '20 00:08 SwaySway

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 avatar Dec 04 '20 00:12 KIWI-JP

@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.

aprilmintacpineda avatar Dec 04 '20 00:12 aprilmintacpineda

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.

github-actions[bot] avatar May 25 '21 12:05 github-actions[bot]