Skip to content

Conversation

@arekborucki
Copy link
Collaborator

Add ^ anchor to regex query on files.files collection to enable efficient index prefix search. Without the anchor, MongoDB scans the entire filename index (~116K keys) for each query, taking 600-850ms. With the anchor, MongoDB can use the index as a prefix lookup and find matching documents in a few index operations, reducing query time

@arekborucki arekborucki requested a review from gary149 January 29, 2026 13:14
@gary149 gary149 merged commit 421298c into main Jan 29, 2026
6 checks passed
@gary149 gary149 deleted the feature/fix-mongodb-issues branch January 29, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants