[CSHARP-3839] IMongoQueryable<T> support for OrderBy a SortDefinition<T>(TextSearch) Created: 07/Sep/21  Updated: 31/Mar/22

Status: Backlog
Project: C# Driver
Component/s: Linq
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Unknown
Reporter: Brian Buvinghausen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

All,

Currently the FilterDefinition<T> support for IMongoQueryable<T> works great via the Inject extension method.

We really should also have the ability to order by a SortDefinition<T> as well.  I realize the Expression<Func<T, TKey>> parameter the typical OrderBy takes likely won't work as you're not actually sorting by a concrete field in the case of a MetaTextScore so my guess is an override would be needed but the ability to order our text searches from IMongoQueryable would be greatly appreciated.

The closest thing I found to this was on CSHARP-2566 there was a comment by Richard Collette about projecting the MetaTextScore.  Since version 4.4 supports ordering by the score without having to also project it this is less of a concern to me.

Regards,
Brian



 Comments   
Comment by Brian Buvinghausen [ 08/Sep/21 ]

Thanks James

Comment by James Kovacs [ 08/Sep/21 ]

Hi, buvy@assurely.com,

Thank you for the feature request. We will discuss and consider it for a future release. Please watch this ticket for updates.

Sincerely,
James

Generated at Wed Feb 07 21:46:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.