【问题标题】:I'm having trouble fetching data from elastic Search domain我在从弹性搜索域中获取数据时遇到问题
【发布时间】:2019-12-25 16:51:19
【问题描述】:

我正在尝试从我的 ES 域中获取数据以用于我的 Alexa 技能 lambda 函数。我使用了https://github.com/elastic/elasticsearch-js的以下代码模板:

const { Client } = require('@elastic/elasticsearch')
const client = new Client({ node: 'http://localhost:9200' })

// promise API
const result = await client.search({
  index: 'my-index',
  body: { foo: 'bar' }
})

这是我在 lambda 函数中遇到的错误:

回应:

{
  "errorMessage": "Response Error",
  "errorType": "ResponseError",
  "stackTrace": [
    "IncomingMessage.response.on (/var/task/node_modules/@elastic/elasticsearch/lib/Transport.js:290:25)",
    "emitNone (events.js:111:20)",
    "IncomingMessage.emit (events.js:208:7)",
    "endReadableNT (_stream_readable.js:1064:12)",
    "_combinedTickCallback (internal/process/next_tick.js:138:11)",
    "process._tickDomainCallback (internal/process/next_tick.js:218:9)"
  ]
}

请求 ID:

"8d9b248a-c0dc-4b1c-bcb2-d54e267c28c7"

功能日志:

开始请求 ID:8d9b248a-c0dc-4b1c-bcb2-d54e267c28c7

版本:$LATEST 2019-04-09T19:48:46.107Z 8d9b248a-c0dc-4b1c-bcb2-d54e267c28c7

{"errorMessage":"Response Error","errorType":"ResponseError","stackTrace":["IncomingMessage.response.on (/var/task/node_modules/@elastic/elasticsearch/lib/Transport.js:290:25)","emitNone (events.js:111:20)","IncomingMessage.emit (events.js:208:7)","endReadableNT (_stream_readable.js:1064:12)","_combinedTickCallback (internal/process/next_tick.js:138:11)","process._tickDomainCallback (internal/process/next_tick.js:218:9)"]}

END 请求 ID:8d9b248a-c0dc-4b1c-bcb2-d54e267c28c7

报告请求 ID:8d9b248a-c0dc-4b1c-bcb2-d54e267c28c7
持续时间:1159.14 毫秒
计费持续时间:1200 毫秒
内存大小:128 MB 使用的最大内存:70 MB

【问题讨论】:

    标签: elasticsearch lambda alexa


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-01-14
    • 2013-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-13
    • 2016-01-03
    相关资源
    最近更新 更多