인덱스 (Index)
Functions for Index
create_index([(‘index_name’, order)])
e.g.) my_collection.create_index([(‘address’, 1)]) index_information()
e.g.) my_collection.index_information()drop_index ([(‘index_name’, order)])
my_collection.drop_index([(‘address’, 1)]) Compound Index
my_collection.create_index([
(‘name’, pymongo.DESCENDING),
(‘address’, pymongo.ASCENDING)])
e.g.)
my_collection.create_index([(‘name’, -1), (‘address’, 1)])Indexing on Embedded Document
Unique & Sparse Index
Hint
Geospatial Index
Text Index
Last updated
Was this helpful?