Created
September 9, 2020 16:46
-
-
Save aniruddha27/bfcdc25c1589dc043766b56d0043af51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Drop indexes | |
db.restaurants.drop_indexes() | |
# Create text index | |
db.restaurants.create_index([('name', 'text')], | |
name='restaurant_name') | |
# List indexes | |
pprint(db.restaurants.index_information()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment