Hi,
I’m using mongo atlas for auto complete search, it was working correctly then I decided to add some pre-filtering and not it doesn’t return anything
Here’s my index configuration
``{
“mappings”: {
“dynamic”: false,
“fields”: {
“body”: [
{
“foldDiacritics”: true,
“maxGrams”: 15,
“minGrams”: 2,
“tokenization”: “edgeGram”,
“type”: “autocomplete”
}
],
“title”: [
{
“foldDiacritics”: true,
“maxGrams”: 15,
“minGrams”: 2,
“tokenization”: “edgeGram”,
“type”: “autocomplete”
}
]
}
}
}````
and here’s my code
`` $search: {
index: “default”,
compound: {
must: {
equals: {
path: “lng”,
value: lng,
},
},
should: [
{
autocomplete: {
query: search,
path: “title”,
},
},
{
autocomplete: {
query: search,
path: “body”,
},
},
],
},
},