Today I found out about the "exists" operator sadly apparently it is
not supported by pymongo (or I have the wrong syntax).
I upgraded to 1.0 both for pymongo and mongo itself. But I'm still getting.
>>> from pymongo.connection import Connection
>>> connection = Connection()
>>> db=connection.edb
>>> [a for a in db.fooo.find({'name' : {'$exists' :'true'}})]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-i686/egg/pymongo/cursor.py", line 444, in next
File "build/bdist.linux-i686/egg/pymongo/cursor.py", line 419, in _refresh
File "build/bdist.linux-i686/egg/pymongo/cursor.py", line 392, in send_message
pymongo.errors.OperationFailure: database error: invalid $operator: $exists
>>> import pymongo
>>> pymongo.__file__
'/home/elpargo/venvs/e/lib/python2.5/site-packages/pymongo-1.0-py2.5-linux-i686.egg/pymongo/__init__.pyc'
is this a bug or am I doing something wrong?