Node.js 如何解决';未找到';带有elasticsearch的expressjs中的消息
您能告诉我如何在expressjs上解决此错误消息吗Node.js 如何解决';未找到';带有elasticsearch的expressjs中的消息,node.js,express,
elasticsearch,elastic-stack,bigdata,Node.js,Express,
elasticsearch,Elastic Stack,Bigdata,您能告诉我如何在expressjs上解决此错误消息吗 POST /test/_search 404 45.691 ms - 1235 Trace: Not Found 我刚刚用elasticsearch在expressjs中尝试了这段代码 /* GET home page. */ router.get('/', function(req, res, next) { client.search({ index: 'test', body:{ query:{ multi
POST /test/_search 404 45.691 ms - 1235
Trace: Not Found
我刚刚用elasticsearch在expressjs中尝试了这段代码
/* GET home page. */
router.get('/', function(req, res, next) {
client.search({
index: 'test',
body:{
query:{
multi_match:{
query: 'i5',
fields: ['title']
}
}
}
}).then(function (response) {
var hits = response.hits.hits;
console.log(response);
console.log(response.hits);
console.log(response.hits.hits);
}, function (error) {
console.trace(error.message);
})
res.render('index', { title: 'Express'});
});
请帮助解决此问题谢谢在浏览器中打开页面时会发生什么?在浏览器中打开页面时会发生什么?