var searchRequest = new SearchRequestDescriptor<AlarmHistory>()
.From(from)
.Size(size)
.Query(q => q
.Term(t => t
.Field(f => f.RobotId.Suffix("keyword"))
.Value(requestModel.RobotId)
)
)
.Sort(s => s
.Descending(f => f.Timestamp) // Sort by Timestamp field in descending order
);
in my code I want to sort the query on basis of paramter column and order DESC,ASC .
I tried everything in chatgpt not getting the correct result