【问题标题】:Unknown index plugin 'autocomplete' MongoDB未知索引插件“自动完成”MongoDB
【发布时间】:2021-04-27 12:25:35
【问题描述】:

我在为搜索查询创建索引时收到此错误。我想为我的搜索引擎自动完成,但 mongo db 不断抛出这个错误。

这是我的代码:

    const tracks = db.collection("tracks")
    await tracks.createIndex({
        "info.title": "autocomplete",
        artist: "autocomplete",
        genre: "autocomplete",
        sid: "autocomplete",
    })

【问题讨论】:

    标签: javascript node.js mongodb express mongodb-atlas-search


    【解决方案1】:

    autocomplete 是 MongoDB Atlas 搜索功能。

    您需要通过 Atlas API 或 UI 创建索引。

    https://docs.atlas.mongodb.com/reference/atlas-search/create-index/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-20
      • 2021-04-26
      • 1970-01-01
      • 2022-10-24
      • 1970-01-01
      • 1970-01-01
      • 2011-02-13
      • 2010-10-29
      相关资源
      最近更新 更多