Creating text index in pymongo Creating text index in pymongo mongodb mongodb

Creating text index in pymongo


Sending it as an array worked.

collection.create_index([('h', TEXT)], default_language='english')

I've also used collection.getIndexes() to check it:

    {    "key" : {        "h" : "text"    },    "ns" : "a.a",    "name" : "h_text"}