{
'$search': {
"index": "default",
"compound": {
"must": [{
"text" : {
"query": "NY",
"path" : "state",
"synonyms": synonyms_state"
}
}],
"mustNot": [{
"text" : {
"query": "New York City",
"path" : "city",
"synonyms": "synonyms_city"
}
}]
}
}
},
I am trying to build out a compound search using the must and mustNot keywords. I want to be able to use synonyms in both the must and mustNot but if I include synonyms in the mustNot I am hit with the following error: MongoServerError: Remote error from mongot :: caused by :: Cannot call docFreq() when needsStats=false
Any suggestions on how to make this work?