Skip to content

Commit 3f174f2

Browse files
JV0812kimsauce
andauthored
Update sort.md (#4950)
* Update sort.md * Update sort.md Update to line 9 --------- Co-authored-by: Kim (Sumo Logic) <[email protected]>
1 parent eaa9fac commit 3f174f2

File tree

1 file changed

+10
-1
lines changed
  • docs/search/search-query-language/search-operators

1 file changed

+10
-1
lines changed

docs/search/search-query-language/search-operators/sort.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ sidebar_label: sort
66

77
The `sort` operator orders aggregated search results. The default sort order is descending. Then you can use the top or limit operators to reduce the number of sorted results returned.
88

9-
Order is also synonymous with sort. You can use them interchangeably in your queries.
9+
The `order` operator is synonymous with the `sort` operator. You can use them interchangeably in your queries.
1010

1111
## Syntax
1212

1313
```sql
1414
sort by <field> (displays results as descending, by default)
1515
```
1616

17+
```sql
18+
order by <field> (displays results as descending, by default)
19+
```
20+
1721
```sql
1822
sort by +<field> (displays results as ascending)
1923
```
@@ -51,6 +55,11 @@ status AND down | extract "user=(?<user>.*?):" | count (*) group by user | sort
5155
... | count user | sort by _count asc
5256
```
5357

58+
```sql
59+
| parse "GET * " as url | count by url | order by _count
60+
| order by _count asc
61+
```
62+
5463
### Top 10 pages by page hits
5564

5665
This example counts page hits by sourceHost, sorts them by page hits, and limits the results to the top 10.

0 commit comments

Comments
 (0)