Hi @Jason_Tran ,
Phrase does not work as it does not operate under OR condition. We want to match if any of the word is matched in query
- Atlas search index definition
Index created on Name - Search query attampted
[
{
$search: {
index: "SearchProduct",
text: {
query: "dodge ram floor mats",
path: "name",
fuzzy: {}
}
}
}
]
- Sample document(s)
Documents with name : dodge, dodge ram, ram dodge 2016, dodge ram 2500, floor mats for dodge ram - Expected output
a) the result should get in descending order for maximum matched words 1st and so on
Example : If search is “dodge ram floor mats” then should get “floor mats for dodge ram” 1st
b) Applying fuzzy so if someone uses mat instead of mats then too it should be considered.
Let me know if you need more info
Thanks