Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3839

IMongoQueryable<T> support for OrderBy a SortDefinition<T>(TextSearch)

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Linq
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      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

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            buvy@assurely.com Brian Buvinghausen
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: