I am using free text search of mongo2.4 with pymongo. What I want is to get the number of documents having some text. In the mongo shell, increasing the limit is a good turnaround, but from python it gets very slow since all documents have to be sent. For indication, the query is ~50 times slower in pymongo compared to mongo shell.
I use a command similar to this:
>>>res=db.command('text','mytable',search='eden',limit=100000)
>>>numfound = res['stats']['nfound']
But as I said, since all documents are returned, it is really slow. Is there a command to specify that you don't need documents, just the stats?? What is the list of all available options??
thx, colin