Parcourir la source

Spelling out the sort order options

Closes #9768
Geoff Bourne il y a 10 ans
Parent
commit
0e09c02c56
1 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. 11 0
      docs/reference/search/request/sort.asciidoc

+ 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