1
0
Эх сурвалжийг харах

Spelling out the sort order options

Closes #9768
Geoff Bourne 10 жил өмнө
parent
commit
0e09c02c56

+ 11 - 0
docs/reference/search/request/sort.asciidoc

@@ -26,6 +26,17 @@ field name for `_score` to sort by score.
 The sort values for each document returned are also returned as part of
 the response.
 
+==== Sort Order
+
+The `order` option can have the following values:
+
+[horizontal]
+`asc`:: Sort in ascending order
+`desc`:: Sort in descending order
+
+The order defaults to `desc` when sorting on the `_score`, and defaults
+to `asc` when sorting on anything else.
+
 ==== Sort mode option
 
 Elasticsearch supports sorting by array or multi-valued fields. The `mode` option