jina-ai / jina-ai/executors

MongoDB: more efficient search

Open
#93 0 comments 0 reactions 0 assignees View on GitHub
priority/important-longterm type/bug
Dominant language
Python
Stars
31
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Also regarding the search, you should not use `collection.find_one` for performance reasons.

I think it is much more efficient to search all documents at once and then sort them:

`.find({'id': { '$in': ids }})`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.