planner returned error: unable to find index for $geoNear query at Connection Ask Question

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Incomplete
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Geo
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      I haven't use the $geoNear in my query instead I have used $near. But this is showing the error of $geoNear. And the error create the interruption in processing the query. Not always but once in every hour.
      I have used '2dsphere' index already---

      scheduleRideSchema.index({ source: '2dsphere' });
       
      {{ $or: [{ $or: [{ $and: [{ pickupStart:

      { $gte: pickupStartTime }

      }, { pickupEnd:

      { $lte: pickupStartTime }

      }] },{ $and: [{ pickupStart:

      { $gte: pickupStartTime }

      }, { pickupEnd:

      { $lte: pickupEndTime }

      }] }]}, { $or: [{ $and: [{ pickupStart:

      { $lte: pickupStartTime }

      }, { pickupEnd:

      { $gte: pickupStartTime }

      }] },{ $and: [{ pickupStart:

      { $lte: pickupStartTime }

      }, { pickupEnd:

      { $gte: pickupEndTime }

      }] }]}]}, { $and:[{ source:{ $near:{ $geometry:

      { type: "Point", coordinates: sourceCord.coordinates }

      , $maxDistance: 4000}}},{$and:[

      {cancel:false}

      ,

      { complete:false}

      ]}]}]});}}

            Assignee:
            Dmitry Agranat
            Reporter:
            Siddhartha Singh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: