Multiple field Sorting after bucket aggregation in Nest elastic search C#

Hi All

I am trying to write sorting on multiple fields after performing bucketing aggregation. When I upgraded to Nest 6.0.0.0 C# I am getting an error saying that the following I need to convert my descriptor to IPromise<IList>.
I am not exactly sure how to provide this input.
My function snippet is something like this :

var sortList = new List() ;
foreach (SortCriteria sc in sortCriterias) {

        switch (sc.SortMode) {
           case SortMode.Asc:
                 sortList.Add(new SortField { Field = "Test", Order = SortOrder.Ascending });
              break;
           case SortMode.Desc:
                 sortList.Add(new SortField { Field = "Test2", Order = SortOrder.Descending });
              break;
        }
     }
     return sortList; --> Somehow I need to convert this list to IPromise<IList<ISort>>

Can someone help me out in how to write this multiple field sort

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.