Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created September 9, 2020 14:37
# Create unique Compound Index
db.restaurants.create_index([('cuisine',pymongo.ASCENDING),
('borough',pymongo.ASCENDING)],
name='cuisine_borough',
unique=True)
pprint(db.neighborhoods.index_information())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment