From 37ac04ee8ee2b271b725dc071fd71d892d518c42 Mon Sep 17 00:00:00 2001 From: ashwinkumar12345 Date: Sun, 6 Jun 2021 00:22:43 -0700 Subject: [PATCH 1/2] minor edits --- docs/opensearch/aggregations.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/opensearch/aggregations.md b/docs/opensearch/aggregations.md index 160ec4d6..1f572402 100644 --- a/docs/opensearch/aggregations.md +++ b/docs/opensearch/aggregations.md @@ -16,13 +16,13 @@ OpenSearch can perform aggregations on massive datasets in milliseconds. Compare ## Aggregations on text fields -By default, OpenSearch doesn't support aggregations on a text field. -Because text fields are tokenized, an aggregation on a text field has to reverse the tokenization process back to its original string and then formulate an aggregation based on that. Such an operation consumes significant memory and degrades cluster performance. +By default, OpenSearch doesn't support aggregations on a text field. Because text fields are tokenized, an aggregation on a text field has to reverse the tokenization process back to its original string and then formulate an aggregation based on that. This kind of an operation consumes significant memory and degrades cluster performance. While you can enable aggregations on text fields by setting the `fielddata` parameter to `true` in the mapping, the aggregations are still based on the tokenized words and not on the raw text. We recommend keeping a raw version of the text field as a `keyword` field that you can aggregate on. -In this case, you can perform aggregations on the `title.raw` field, instead of the `title` field: + +In this case, you can perform aggregations on the `title.raw` field, instead of on the `title` field: ```json PUT movies @@ -61,15 +61,13 @@ GET _search If you’re only interested in the aggregation result and not in the results of the query, set `size` to 0. -In the `aggs` property (you can use `aggregations` if you want), you can define any number of aggregations. -Each aggregation is defined by its name and one of the types of aggregations that OpenSearch supports. +In the `aggs` property (you can use `aggregations` if you want), you can define any number of aggregations. Each aggregation is defined by its name and one of the types of aggregations that OpenSearch supports. -The name of the aggregation helps you to distinguish between different aggregations in the response. -The `AGG_TYPE` property is where you specify the type of aggregation. +The name of the aggregation helps you to distinguish between different aggregations in the response. The `AGG_TYPE` property is where you specify the type of aggregation. ## Sample aggregation -This section uses the OpenSearch Dashboards sample e-commerce data and web log data. To add the sample data, log in to OpenSearch Dashboards, choose **Home** and **Try our sample data**. For **Sample eCommerce orders** and **Sample web logs**, choose **Add data**. +This section uses the OpenSearch Dashboards sample ecommerce data and web log data. To add the sample data, log in to OpenSearch Dashboards, choose **Home**, and then choose **Try our sample data**. For **Sample eCommerce orders** and **Sample web logs**, choose **Add data**. ### avg @@ -129,7 +127,7 @@ There are three main types of aggregations: ## Nested aggregations -Aggregations within aggregations are called nested or sub aggregations. +Aggregations within aggregations are called nested or subaggregations. Metric aggregations produce simple results and can't contain nested aggregations. @@ -158,4 +156,4 @@ Bucket aggregations produce buckets of documents that you can nest in other aggr The inner `aggs` keyword begins a new nested aggregation. The syntax of the parent aggregation and the nested aggregation is the same. Nested aggregations run in the context of the preceding parent aggregations. -You can also pair your aggregations with search queries to narrow down things you’re trying to analyze before aggregating. If you don't add a query, OpenSearch implicitly uses the `match_all` query. +You can also pair your aggregations with search queries to narrow down things you’re trying to analyze before aggregating. If you don't add a query, Elasticsearch implicitly uses the `match_all` query. From 59d63291b9387289da705d8a9fcedf547e8fd771 Mon Sep 17 00:00:00 2001 From: ashwinkumar12345 Date: Sun, 6 Jun 2021 00:27:01 -0700 Subject: [PATCH 2/2] minor fix --- docs/opensearch/aggregations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/opensearch/aggregations.md b/docs/opensearch/aggregations.md index 1f572402..3310a931 100644 --- a/docs/opensearch/aggregations.md +++ b/docs/opensearch/aggregations.md @@ -156,4 +156,4 @@ Bucket aggregations produce buckets of documents that you can nest in other aggr The inner `aggs` keyword begins a new nested aggregation. The syntax of the parent aggregation and the nested aggregation is the same. Nested aggregations run in the context of the preceding parent aggregations. -You can also pair your aggregations with search queries to narrow down things you’re trying to analyze before aggregating. If you don't add a query, Elasticsearch implicitly uses the `match_all` query. +You can also pair your aggregations with search queries to narrow down things you’re trying to analyze before aggregating. If you don't add a query, OpenSearch implicitly uses the `match_all` query.