MongoEngine / MongoEngine/mongoengine
Support for TextSearch (MongoAtlas)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.3k
- Forks
- 1.2k
- Avg merge
- 4h 41m
- Merged PRs (30d)
- 11
Description
Hi guys! I have absolutely no idea if you even would consider this use case that at my Organization we were facing, but let me try anyway.
We are currently using MongoEngine in our codebase, and we are using MongoAtlas to manager our cluster.
Atlas Search was recently published, and we gave it a try, and as you all know, it is actually a lot faster than the normal search.
Now, since we have some query that are quite expensive, we decided to migrate pretty much all the query to Atlas Search. Unfortunately this would mean two things:
- Rewrite all the current query in our codebase (meaning pain and suffering that I would gladly skip)
- Have an even different syntax without all the currently checks that MongoEngine has implemented.
Now, to solve this use case, since we did not find any opensource solution that would solve it, we decide that doing the complicate things was actually more fun than doing the boring things: so we wrote a proxy, called AtlasQ, where its users can continue to use the MongoEngine syntax but they will be using the engine of Atlas Search. We have added come validity check in the inputs (you can call e method to ensure that the index exists and that all the fields are actually indexed, because my previous self debugged for too much time, and I do not want other people to share the same feelings); inputs and outputs of all the methods that mongoengine implemented (first(), filter(), aggregate(), count(), ...) have the same signatures.
If this proxy could be useful, if there are actually other organizations that could benefit from that, we could easily merge it inside the mongoengine repository with a little bit of tuning here there!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the linked AtlasQ project and compare its MongoEngine-compatible first(), filter(), aggregate(), and count() interfaces with this repository. The issue does not name files, tests, or a concrete integration scope; progress would require deciding whether Atlas Search support belongs in MongoEngine and defining the accepted behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100