I have an Atlas Search index that covers multiple fields and also uses a couple synonyms. I am getting an error when I try to use synonyms in the mustNot. Is this error telling me I am not able to use synonyms in the mustNot part of the compound? Any suggestions on how to work around this?
MongoServerError: Remote error from mongot :: caused by :: Cannot call docFreq() when needsStats=false
{
'$search': {
"index": "default",
"compound": {
"must": [{
"text" : {
"query": "NY",
"path" : "state",
"synonyms": "synonyms_state"
}
},
],
"mustNot": [{
"text" : {
"query": 'NYC',
"path" : "city",
"synonyms": "synonyms_city"
}
}]
}
}
}