-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add children aggregation documentation #7645
Conversation
Signed-off-by: Melissa Vagi <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
_aggregations/bucket/children.md
Outdated
|
||
The `authors` aggregation groups the documents by the `author.keyword` field. Within each author group, we have a `children` aggregation that looks at the associated posts. Inside the `posts` aggregation, another `children` aggregation looks at the comments associated with each post. Within the `comments` aggregation, the `value_count` aggregation counts the number of comments for each post. | ||
|
||
#### Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technical reviewer: Please confirm this example is relevant to an OpenSearch user. I tested the example using Dev Tools. If another example is more appropriate, please replace the draft example with your example. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msfroh @bowenlan-amzn @sandeshkr419 Would one of you be available to technical review this PR? The doc team is closing content gaps for aggregations and need a technical review before we can published the doc. Please note that I used internal tools to assist in code example generation and Dev Tools to test those examples. Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only see the search request and response here, can you provide what data you ingest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bowenlan-amzn I used the sample data sets in OpenSearch Dashboards. Feel free to update with relevant examples for OpenSearch users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the sample data sets is fine, I think just mention that here and this is good.
Signed-off-by: Melissa Vagi <[email protected]>
_aggregations/bucket/children.md
Outdated
|
||
The `children` aggregation connects parent documents with their related child documents. This allows you to analyze relationships between different types of data in a single query, rather than having to run multiple queries and combine the results yourself. | ||
|
||
For example, if you have a parent-child relationship between authors, posts, and comments, you can analyze the relationships between the data different types (`authors`, `posts`, and `comments`) in a single query, without having to run multiple queries and combine the results manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bowenlan-amzn Does this clarify the sample index and data comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to provide the requests you used to index the data that correspond to below search request and response.
Signed-off-by: Melissa Vagi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vagimeli Please see my comments and changes and let me know if you have any questions. Thanks!
For example, if you have a parent-child relationship between authors, posts, and comments, you can analyze the relationships between the data different types (`authors`, `posts`, and `comments`) in a single query, without having to run multiple queries and combine the results manually. | ||
|
||
The `authors` aggregation groups the documents by the `author.keyword` field. Within each author group, we have a `children` aggregation that looks at the associated posts. Inside the `posts` aggregation, another `children` aggregation looks at the comments associated with each post. Within the `comments` aggregation, the `value_count` aggregation counts the number of comments for each post. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Above: Please replace both instances of the phrasal verb "looks at" with a more precise verb. What do the aggregations actually do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Melissa Vagi <[email protected]>
Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Melissa Vagi <[email protected]>
Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Melissa Vagi <[email protected]>
Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Melissa Vagi <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
* Add children aggregation documentation Signed-off-by: Melissa Vagi <[email protected]> * Add children aggregation documentation Signed-off-by: Melissa Vagi <[email protected]> * Add children aggregation documentation Signed-off-by: Melissa Vagi <[email protected]> * Add content gaps to list Signed-off-by: Melissa Vagi <[email protected]> * Update examples to include data samples Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/children.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/children.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/children.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/children.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/index.md Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/index.md Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/children.md Signed-off-by: Melissa Vagi <[email protected]> * Fix dead links Signed-off-by: Melissa Vagi <[email protected]> --------- Signed-off-by: Melissa Vagi <[email protected]> Co-authored-by: Naarcha-AWS <[email protected]> Co-authored-by: Nathan Bower <[email protected]>
* Add children aggregation documentation Signed-off-by: Melissa Vagi <[email protected]> * Add children aggregation documentation Signed-off-by: Melissa Vagi <[email protected]> * Add children aggregation documentation Signed-off-by: Melissa Vagi <[email protected]> * Add content gaps to list Signed-off-by: Melissa Vagi <[email protected]> * Update examples to include data samples Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/children.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/children.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/children.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/children.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/index.md Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/index.md Signed-off-by: Melissa Vagi <[email protected]> * Update _aggregations/bucket/children.md Signed-off-by: Melissa Vagi <[email protected]> * Fix dead links Signed-off-by: Melissa Vagi <[email protected]> --------- Signed-off-by: Melissa Vagi <[email protected]> Co-authored-by: Naarcha-AWS <[email protected]> Co-authored-by: Nathan Bower <[email protected]>
Description
Closes content gaps for the following bucket aggregations:
Auto-interval date histogram
Children
Composite
Parent
Rare terms
Issues Resolved
#4293
Version
Current version
Frontend features
If you're submitting documentation for an OpenSearch Dashboards feature, add a video that shows how a user will interact with the UI step by step. A voiceover is optional.
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.