【问题标题】:Failing to Write Any Query using MongoDB Atlas Search Index无法使用 MongoDB Atlas 搜索索引编写任何查询
【发布时间】:2021-06-14 02:30:45
【问题描述】:

当我尝试在 MongoDB Atlas 搜索索引中使用 $search 运行任何聚合时出现此错误。

Remote error from mongot :: caused by :: Error connecting to localhost:28000 (127.0.0.1:28000) :: caused by :: Connection refused

【问题讨论】:

    标签: mongodb-atlas-search


    【解决方案1】:

    我发现如果我创建了我的搜索索引并给它一个不是default 的名称,我需要确保在查询中包含索引名称。

      {
          "$search": {
             "index": "parks_and_recreation", 
             "equals": {
                "path": "open",
                "value": true
             }
          }
        }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-01-18
      • 1970-01-01
      • 2016-05-09
      • 2011-02-19
      • 2023-03-28
      • 2021-06-01
      • 1970-01-01
      相关资源
      最近更新 更多