【发布时间】: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 运行任何聚合时出现此错误。
Remote error from mongot :: caused by :: Error connecting to localhost:28000 (127.0.0.1:28000) :: caused by :: Connection refused
【问题讨论】:
我发现如果我创建了我的搜索索引并给它一个不是default 的名称,我需要确保在查询中包含索引名称。
{
"$search": {
"index": "parks_and_recreation",
"equals": {
"path": "open",
"value": true
}
}
}
【讨论】: