Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-288

can't have 2 special fields

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • OS X Lion/Arch Linux

    Description

      Hello I've run into a problem trying to filter a query. Unfortunately
      for pagination purposes I need to do this lookup in a single query.

      Using the latest release of MongoEngine this is the problem:
      I'm getting an error when trying to filter a query by two
      GeoPointFields as
      Ride.objects(Q(orig__within_distance=orig_point_and_dist) &
      Q(dest__within_distance=dest_point_and_dist)).

      Here's the error:

      OperationFailure: command SON([('count', u'ride'), ('query', {'dest':
      {'$within': {'$center': [[47.6062095, -122.3320708], 0.5]}}, '_types':
      'Ride', 'orig': {'$within':

      {'$center': [[47.6587802, -117.4260466], 0.5]}

      }}), ('fields', None)]) failed: exception: can't have 2 special
      fields

      Any thoughts?

      Thanks,

      Max

      Attachments

        Activity

          People

            bernie@mongodb.com Bernie Hackett
            maxcountryman Max Countryman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: