You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I encountered an issue with Beanie where the index on a Link field (specifically for the major field in my Course document) does not seem to be used during queries. However, the index works correctly when using a native MongoDB query with DBRef. Below is the code and a comparison of the behavior. i found the difference by checking usage of major field index (inside course collection) in mongodb compass
Expected behavior
The index on the major field should be used when querying via Beanie, and MongoDB Compass should show an increase in index usage.
Additional context
This issue seems to be related to how Beanie handles Link fields and indexing. The native query works fine, but the Beanie query does not utilize the index.
The text was updated successfully, but these errors were encountered:
Describe the bug
I encountered an issue with Beanie where the index on a Link field (specifically for the major field in my Course document) does not seem to be used during queries. However, the index works correctly when using a native MongoDB query with DBRef. Below is the code and a comparison of the behavior. i found the difference by checking usage of major field index (inside course collection) in mongodb compass
To Reproduce
Expected behavior
The index on the major field should be used when querying via Beanie, and MongoDB Compass should show an increase in index usage.
Additional context
This issue seems to be related to how Beanie handles Link fields and indexing. The native query works fine, but the Beanie query does not utilize the index.
The text was updated successfully, but these errors were encountered: