Gravatar for

Question by aga, Jul 13, 2016 3:02 PM

Using linq to sort on multile fields


I'm using linq to query Coveo and I need to sort on 2 fields i.e. sort by dateField and then by Name field. Here is my linq code but the results are sorted only on the first field.

      IQueryable<IndexItem> query = context.GetQueryable<IndexItem>().
                Filter(GetSearchPredicate(startDate, endDate)).
                OrderBy(r => r.StartTime).
                OrderBy(r => r.EventName);


1 Reply
Gravatar for

Answer by Jean-François L'Heureux, Jul 13, 2016 3:39 PM

I unfortunately don't think this is supported in the Coveo for Sitecore LINQ to Coveo module. I'm sorry.


Ask a question