【发布时间】:2021-10-31 12:56:42
【问题描述】:
我在 heroku 上使用 npm elasticsearch 和盆景,并在下面不断收到此错误:
statusCode: 404,
response: `{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [question] and [action.auto_create_index] ([*logstash*,*requests*,*events*,*.kibana*,*kibana-int*,*filebeat*,.watches,.triggered_watches,.watcher-history-*]) doesn't match","index_uuid":"_na_","index":"question"}],"type":"index_not_found_exception","reason":"no such index [question] and [action.auto_create_index] ([*logstash*,*requests*,*events*,*.kibana*,*kibana-int*,*filebeat*,.watches,.triggered_watches,.watcher-history-*]) doesn't match","index_uuid":"_na_","index":"question"},"status":404}`,
这是我正在使用的代码,目前没有文档。
client.index({
index: 'question',
id: question_id,
type: 'questions',
body: {
"title": title,
"tags": tags
}
}, function(err, resp, status) {
我的假设是如果索引不存在就不会创建它,但我认为它是默认自动创建的?
任何帮助将不胜感激。
【问题讨论】:
标签: node.js elasticsearch heroku