-
Hey, I have been experimenting with mikroORM lately and ran into an issue with Indexes.
I would really appreciate it if anyone could help me. btw. I created the same Issue in Slack and I will close this with the Solution If someone over there can help me. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Not sure what you are up to, you don't query the index, you query properties of the entity, the index just helps to make the query faster. You are probably looking for Never really used mongo full text search myself, but something like this might be what you want (note you don't reference the index name at all): const customers = await DI.customerRepository.find({ [expr('$text')]: { $search: query } }); Note you need to use the |
Beta Was this translation helpful? Give feedback.
Not sure what you are up to, you don't query the index, you query properties of the entity, the index just helps to make the query faster. You are probably looking for
$text
operator.Never really used mongo full text search myself, but something like this might be what you want (note you don't reference the index name at all):
Note you need to use the
expr
helper function to escape strict typings.