I am using below code to create a partial index in mongodb for the records having null values. When I execute the below code.
db = self.db_conn[db_name ]
collection = db[collection_name]
status = collection.create_index([("Col1", pym.ASCENDING), ("Col2", pym.ASCENDING)], {partialFilterExpression : {"value": None}})
Its giving me a error:
"name 'partialFilterExpression' is not defined"
My pymongo version 3.2.2 Mongodb version 3.4