I am using the MGO to communicate with mongodb. I want to search in a collection, and to sort the results by search score.
collection.Find(bson.M{
"$text": bson.M{"$search": "mysearch"},
"score": bson.M{"$meta": "textScore"},
})
But I get this error :
Can't canonicalize query: BadValue unknown operator: $meta (status code : 500)
When I only try with $text, it works.
I use the same bson structure than here : MongoDB - Can't canonicalize query: BadValue unknown operator: $meta
Thanks