From my collection I just want to return records that have either location or place information (Coordinates included) in the records. So if either condition is not null then it retrieves either or both fields if both conditions are not null.
My query is this so far:
cursor = coll.find({"$or" : [{"place.bounding_box.type" : {"$ne" : None }}, {"coordinates.type" : {"$ne" : None }}]}, {"coordinates.coordinates" :1},
{"place.bounding_box.coordinates" : 1}, tailable = True, timeout = False)
But I get this pymongo error:
raise TypeError("skip must be an instance of int")
TypeError: skip must be an instance of int
I can get the queries to work separately but not in a join query as above.
Thanks
I'm not familiar with pymongo, but MongoDB doesn't support joins... You will need to run the two queries separately, and join the results.
That error sounds like you are doing a .skip("string") on the results cursor.
Also, you should have a read on $exists as well.