The following code shows how to sort documents based on product rating
in descending order and then cheapest product within similarly rated
products, sorting at most 1000 documents:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-26 UTC."],[[["`SortOptions` is used for multi-dimensional sorting of documents, inheriting from `expected_type`."],["It allows sorting documents based on multiple `SortExpression` criteria, with each expression having a direction (ascending or descending) and a default value."],["The `expressions` parameter accepts an iterable of `SortExpression`, defining the multi-dimensional sort."],["A `match_scorer` can be specified to score documents, either alone or combined within a `SortExpression`."],["The `limit` parameter controls the maximum number of documents to be scored or sorted, with a default of 1000."]]],[]]