hi, mongo community.
I have bug report.
When a paging request is made using ‘pagination token’ using ‘search index’, an aggregation query error occurs intermittently.
The development environment is golang 1.19, and mongodb.org/mongo-driver 1.14 is in use.
Below is an error message.
(UnknownError) class java.lang.Float cannot be cast to class org.bson.BsonValue (java.lang.Float is in module java.base of loader 'bootstrap'; org.bson.BsonValue is in unnamed module of loader 'app')
Below is an query example
pipeline := []bson.D{
{{
Key: "$search",
Value: bson.M{
"index": "{search-index-name}",
"sort": bson.M{
"unused": bson.M{"$meta": "searchScore"},
"name": 1
},
"searchAfter": "{token}",
"compound": bson.M{
"filter": bson.A{
some condition
},
"must": bson.A{
some condition
}
},
},
}},
{{Key:"$limit", Value:10}},
{{Key:"$project", Value:bson.M{"token": bson.M{"$meta": "searchSequenceToken"}}}},
}