Title
- is text index):sample data:
{_id: 1, Title: 'Some title'}
{_id: 2, Title: 'Some word'}
{_id: 3, Title: 'Some bad word'}
{_id: 4, Title: 'No stop word'}
{_id: 5, Title: 'No more title'}
{_id: 6, Title: 'Some stop'}
$text
search request's:sample data:
[
'some -bad',
'word -bad',
'good -bad',
'"some word" -bad',
]
Need to find all MongoDB
docs which don't match any of this $text
search from array.
Trouble in case of big data.
The approach i take to solve:
_id's
for first search,_id
's (Example: $not_matched_ids
).$not_matched_ids
. But $not_matched_ids
is huge array and DB is big.MongoDB $in
- isn't good solution. Is there another algorithm?