Mongodb 为什么使用GeohayStack失败

Mongodb 为什么使用GeohayStack失败,mongodb,geospatial,Mongodb,Geospatial,我在MongoShell中运行了这个查询,并成功地得到了结果 db.tablebusiness.find({ "LongitudeLatitude" : { "$near" : [106.772835, -6.186753], "$maxDistance" : 0.053980478460939611 }, "indexContents" : { "$all" : [/^warung/] } }).limit(2); 我得到: { "_id" : "warung-nasi-nur-karo

我在MongoShell中运行了这个查询,并成功地得到了结果

db.tablebusiness.find({ "LongitudeLatitude" : { "$near" : [106.772835, -6.186753], "$maxDistance" : 0.053980478460939611 }, "indexContents" : { "$all" : [/^warung/] } }).limit(2);
我得到:

{
  "_id" : "warung-nasi-nur-karomah__-6.19_106.78",
  "BuildingID" : null,
  "Title" : "Warung Nasi Nur Karomah",
  "InBuildingAddress" : null,
  "Building" : null,
  "Street" : "Jl. Arjuna Utara No.35",
  "Districts" : [],
  "City" : "Jakarta",
  "Country" : "Indonesia",
  "LongitudeLatitudeFromGoogle" : null,
  "DistanceFromGoogleAddress" : 0.0,
  "Checkin" : 0,
  "Note" : null,
  "PeopleCount" : 0,
  "Prominent" : 45.5,
  "CountViews" : 0,
  "StreetAdditional" : null,
  "LongitudeLatitude" : {
    "Longitude" : 106.775693893433,
    "Latitude" : -6.18759540055471
  },
  "Rating" : {
    "Stars" : 0.0,
    "Weight" : 0.0
  },
  "Reviews" : [],
  "ZIP" : null,
  "Tags" : ["Restaurant"],
  "Phones" : ["081380087011"],
  "Website" : null,
  "Email" : null,
  "Price" : null,
  "openingHour" : null,
  "Promotions" : [],
  "SomethingWrong" : false,
  "BizMenus" : [],
  "Brochures" : [],
  "Aliases" : [],
  "indexContents" : ["restaura", "estauran", "staurant", "taurant", "aurant", "urant", "rant", "ant", "nt", "t", "warung", "arung", "rung", "ung", "ng", "g", "nasi", "asi", "si", "i", "nur", "ur", "r", "karomah", "aromah", "romah", "omah", "mah", "ah", "h"]
}
但当我尝试使用额外的搜索多键索引进行此查询时,我没有得到任何结果

db.runCommand({ geoSearch : "tablebusiness", near : [106.772835, -6.186753], maxDistance : 0.053980478460939611, search : { "indexContents" : { "$all" : [/^warung/] } }, limit : 30 })
我知道了

{
        "results" : [ ],
        "stats" : {
                "time" : 0,
                "btreeMatches" : 0,
                "n" : 0
        },
        "ok" : 1
}
这是我的收藏数据库中的索引

[
        {
                "v" : 1,
                "key" : {
                        "_id" : 1
                },
                "ns" : "isikotacobacoba.tablebusiness",
                "name" : "_id_"
        },
        {
                "v" : 1,
                "key" : {
                        "LongitudeLatitude" : "2d",
                        "Prominent" : -1,
                        "indexContents" : 1
                },
                "ns" : "isikotacobacoba.tablebusiness",
                "name" : "LongLat_Prominent_indexContents",
                "dropDups" : false,
                "background" : false
        },
        {
                "v" : 1,
                "key" : {
                        "LongitudeLatitude" : "2d",
                        "Prominent" : -1
                },
                "ns" : "isikotacobacoba.tablebusiness",
                "name" : "LongLat_Prominent",
                "dropDups" : false,
                "background" : false
        },
        {
                "v" : 1,
                "key" : {
                        "indexContents" : 1
                },
                "ns" : "isikotacobacoba.tablebusiness",
                "name" : "indexContents",
                "dropDups" : false,
                "background" : false
        },
        {
                "v" : 1,
                "key" : {
                        "LongitudeLatitude" : "2d",
                        "indexContents" : 1,
                        "Prominent" : -1
                },
                "ns" : "isikotacobacoba.tablebusiness",
                "name" : "LongitudeLatitude__indexContents_1_Prominent_-1",
                "bits" : 22
        },
        {
                "v" : 1,
                "key" : {
                        "Title" : 1
                },
                "ns" : "isikotacobacoba.tablebusiness",
                "name" : "Title",
                "dropDups" : false,
                "background" : false
        },
        {
                "v" : 1,
                "key" : {
                        "City" : 1
                },
                "ns" : "isikotacobacoba.tablebusiness",
                "name" : "City",
                "dropDups" : false,
                "background" : false
        },
        {
                "v" : 1,
                "key" : {
                        "LongitudeLatitude" : "geoHaystack",
                        "indexContents" : 1
                },
                "ns" : "isikotacobacoba.tablebusiness",
                "name" : "LongitudeLatitude__indexContents_1",
                "bucketSize" : 0.1
        }
]

如何使用格式使用runCommand mongoDB使用geohaystack和附加字段mulikey???

geohaystack查询不支持附加字段的数组, 只有单个值。地理空间索引的当前实现 geohaystacks不使用标准查询和索引代码

MongoDB geohaystack文档中的示例( ) 仅将附加字段显示为简单的单个值,而不是
geohaystack查询中的值数组。

geohaystack查询不支持附加字段的数组, 只有单个值。地理空间索引的当前实现 geohaystacks不使用标准查询和索引代码

MongoDB geohaystack文档中的示例( ) 仅将附加字段显示为简单的单个值,而不是 geohaystack查询中的值数组