【问题标题】:How to integrate Elasticsearch with sails如何将 Elasticsearch 与 Sails 集成
【发布时间】:2020-01-19 08:55:08
【问题描述】:

我是 Elasticsearch 的新手,我在 elasticsearch 中创建了新数据库并在其中创建了条目。我喜欢将此 Elasticsearch 与 Sails 集成。我使用的风帆版本是 1.0。

我已经尝试过sails-elastic 和sails-elasticsearch npm 并将它们包含在数据存储文件中的适配器中。

但它不允许举起帆,它会抛出错误

If you're using Sails ≥1.0, try:
npm install sails-elasticsearch@latest --save```

even I have installed the latest version of sails-elasticsearch and it is 0.10.3 https://www.npmjs.com/package/sails-elasticsearch



In datastore.js file

adapter: 'sails-elasticsearch',
url: 'https://[username]:[password]@[server]:[port]/'

【问题讨论】:

  • 你使用的是哪个 ES 版本?

标签: node.js elasticsearch npm sails.js node-modules


【解决方案1】:

您尝试过的软件包未更新为支持最新版本的 elasticsearch 和sails.js。我建议你使用由 elastic 团队提供的官方 JS SDK,它是最新的并且维护良好。你可以找到更多关于 JS SDK here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-05-09
    • 1970-01-01
    • 1970-01-01
    • 2018-03-02
    • 2019-09-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多