Skip to content

Commit

Permalink
Add indexes to improve file search speed
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahesh0253 authored Jan 17, 2022
1 parent 0e9287d commit 25fd29d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Media(Document):
caption = fields.StrField(allow_none=True)

class Meta:
indexes = ('$file_name', )
collection_name = COLLECTION_NAME


Expand Down

0 comments on commit 25fd29d

Please sign in to comment.