Hi
I was wondering what the proper manner of doing sort by textScore in the aggregation pipeline was, in ReactiveMongo.
The mongodb
docs say it should be entered as:
db.collection.aggregate(
[
{ $match: { $text: { $search: "operating" } } },
{ $sort: { score: { $meta: "textScore" } } }
]
)
Unfortunately Sort in the AggregationFramework only seems to support Ascending and Descending of simple field names, and both SortOrder and PipelineOperator are sealed traits so I couldn't attempt to force a custom command in.
Thanks for any advice you can offer.