Hi,
I got problem with sort and MustNot in $search compound
[
{
'$search': {
'compound': {
'must': [],
'mustNot': [
{
'phrase': {
'query': 'bar',
'path': [
'title', 'description'
]
}
}
],
'should': [],
'filter': []
}
}
}, {
'$sort': {
'ratemin': 1
}
}
]
I got this every time :
{"errorCode":"OPERATION_ERROR","message":"Reason: [23:47:46.227] Error running aggregation for '****.testlots' on process '****-cluster-shard-00-01-****.mongodb.net:27017' : [23:47:46.227] Error calling aggregation in coll (*****.testlots) for connParams=*****-cluster-shard-00-01-****.mongodb.net:27017 (local=false) partialRes:[[]] : [23:47:46.227] Error executing WithClientFor() for cp=****-cluster-shard-00-01-****.mongodb.net:27017 (local=false) connectMode=SingleConnect identityUsed=mms-automation@admin[[MONGODB-CR/SCRAM-SHA-1]][24] : (MaxTimeMSExpired) Remote error from mongot :: caused by :: operation exceeded time limit","version":"1","status":"ERROR"}
But if i do same pipeline by changing mustNot by must it’s working.
( 500k documents in collection ) ( M40 )
Any idea ?
Thanks.