79817032

Date: 2025-11-11 19:04:31
Score: 1
Natty:
Report link

@Display Name asked about using SortOptionsDescriptor instead of just SortOptions. There is another parameter for sort that takes an

 Action<SortOptionsDescriptor<TDocument>>[] 

for sort options.

You can then just create something like this and pass it to the Sort of a search

Action<SortOptionsDescriptor<TDocument>>[] sortoptions =
[
    sd => sd
        .Field("_score", SortOrder.Desc)
    , sd => sd
          .Field(f => f.Counter, SortOrder.Desc)
];
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Display
  • Low reputation (0.5):
Posted by: JMIII