Complete the code to sort the search results by the field price in ascending order.
{
"sort": [
{"price": {"order": "[1]"}}
]
}To sort results in ascending order, use "order": "asc".
Complete the code to sort the results by date in descending order.
{
"sort": [
{"date": {"order": "[1]"}}
]
}Descending order is specified with "desc" in Elasticsearch sorting.
Fix the error in the sorting code to sort by rating in ascending order.
{
"sort": [
{"rating": {"order": "[1]"}}
]
}The correct order value for ascending is "asc". Words like 'descending' or 'down' cause errors.
Fill both blanks to sort results by price ascending and then by date descending.
{
"sort": [
{"price": {"order": "[1]"}},
{"date": {"order": "[2]"}}
]
}First sort by price ascending (asc), then by date descending (desc).
Fill all three blanks to sort by rating descending, then price ascending, then date descending.
{
"sort": [
{"rating": {"order": "[1]"}},
{"price": {"order": "[2]"}},
{"date": {"order": "[3]"}}
]
}Sort first by rating descending (desc), then price ascending (asc), then date descending (desc).