I have these two documents:
{
"jobTitle": "Asset Manager",
"description": "Working with assets and so on"
},
{
"jobTitle": "Coffeshop Manager",
"description": "Serving assets to clients"
},
I want to find all documents in my database which match "Asset Manager" in "jobTitle" or "description". If possible with some fuzzy.
Currently I use Atlas Search with the $text operator:
{
index: "meta",
compound: {
must: [
{
text: {
query: "Asset Manager",
path: [
"meta.jobTitle",
],
},
},
],
},
}
This returns all the documents mentioned above tho, since Atlas Search splits the query e.g. by space. So it searches for "asset" or "manager". Which is of course not what I want.
I found out that I could use e.g. the $phrase operator which is limited in terms of fuzzy, so also not perfect.
What is the best way to solve this issue?