Retrieve Relevance Ordered Result from Text Query on MongoDB Collection using the C# Driver
I am attempting to text query a collection and retrieve the results in the text match order. The docs explain pretty well how to do this in the shell: db.articles.find( { status: "A", $text: { $search: "coffee cake" } }, { score: { $meta: "textScore" } } ).sort( { date: 1, score: { $meta: "textScore" } } ) but it requires the projection of the additional score field from the find into the sort. In C#, I have a function that looks like this: public IEnumerable<T> TextSearch<T>(MongoCollection<T> coll, string text) { var cursor = coll.Find(Query.Text(text)) .SetSortOrder(SortBy<T>.MetaTextScore(