From 7f19f8d4e03130e43969fa4bc008f3c30535996c Mon Sep 17 00:00:00 2001 From: Jagadisha V <129049263+JV0812@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:05:22 +0530 Subject: [PATCH 1/2] Update sort.md --- .../search-query-language/search-operators/sort.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/search/search-query-language/search-operators/sort.md b/docs/search/search-query-language/search-operators/sort.md index da613f6129..0f07ca9aec 100644 --- a/docs/search/search-query-language/search-operators/sort.md +++ b/docs/search/search-query-language/search-operators/sort.md @@ -14,6 +14,10 @@ Order is also synonymous with sort. You can use them interchangeably in your que sort by (displays results as descending, by default) ``` +```sql +order by (displays results as descending, by default) +``` + ```sql sort by + (displays results as ascending) ``` @@ -51,6 +55,11 @@ status AND down | extract "user=(?.*?):" | count (*) group by user | sort ... | count user | sort by _count asc ``` +```sql +| parse "GET * " as url | count by url | order by _count +| order by _count asc +``` + ### Top 10 pages by page hits This example counts page hits by sourceHost, sorts them by page hits, and limits the results to the top 10. From e419f5746000b1adc569dcd002a23cca21f82477 Mon Sep 17 00:00:00 2001 From: "Kim (Sumo Logic)" <56411016+kimsauce@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:35:51 -0500 Subject: [PATCH 2/2] Update sort.md Update to line 9 --- docs/search/search-query-language/search-operators/sort.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/search/search-query-language/search-operators/sort.md b/docs/search/search-query-language/search-operators/sort.md index 0f07ca9aec..d80f4d8165 100644 --- a/docs/search/search-query-language/search-operators/sort.md +++ b/docs/search/search-query-language/search-operators/sort.md @@ -6,7 +6,7 @@ sidebar_label: sort 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. -Order is also synonymous with sort. You can use them interchangeably in your queries. +The `order` operator is synonymous with the `sort` operator. You can use them interchangeably in your queries. ## Syntax