How can i create index in pymongo with 2 fields, to be unique together?
I have this code:
self.db[self.mongo_collection].create_index("url", unique=True)
but i need to be unique with url and category.
How can i create index in pymongo with 2 fields, to be unique together?
I have this code:
self.db[self.mongo_collection].create_index("url", unique=True)
but i need to be unique with url and category.