How to use WITHIN with 2 geo indexes in one collection?

烂漫一生 提交于 2019-12-11 05:19:21

问题


I have 2 geo indexes in the collection. I need to find all the documents on the first geo-index and another time on another geo-index.

LET cFrom =  (
FOR c IN WITHIN("city", 22.5455400, 114.0683000, 3000, "geofrom")
    FOR r IN rcity 
        FILTER r._from == c._id && r.user == "5010403" && r.type == "freight-m"
        LIMIT 1
RETURN r)

LET cTo =  (
FOR c IN WITHIN("city", 55.7522200, 37.6155600, 3000, "geoTo")
    FOR r IN rcity 
        FILTER r._to == c._id && r.user == "5010403" && r.type == "freight-r"
        LIMIT 100
RETURN r)

来源:https://stackoverflow.com/questions/48657397/how-to-use-within-with-2-geo-indexes-in-one-collection

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!