Skip to content
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

Clean up and changes for the demo #58

Merged
merged 9 commits into from
Dec 10, 2024
Merged

Clean up and changes for the demo #58

merged 9 commits into from
Dec 10, 2024

Conversation

jzonthemtn
Copy link
Collaborator

Changes for the demo.

Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
@jzonthemtn jzonthemtn changed the title Changes for the demo Clean up and changes for the demo Dec 10, 2024
Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>

final SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.query(queryBuilder);
searchSourceBuilder.aggregation(actionNameAggregation);
searchSourceBuilder.from(0);
searchSourceBuilder.size(100);
searchSourceBuilder.size(0);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing result size to 0 because we don't care about the documents.

final TermsAggregationBuilder positionsAggregator = AggregationBuilders.terms("By_Position").field("event_attributes.position.ordinal").size(parameters.getMaxRank());
final TermsAggregationBuilder actionNameAggregation = AggregationBuilders.terms("By_Action").field("action_name").subAggregation(positionsAggregator).size(parameters.getMaxRank());
// Order the aggregations by _id and not by value.
final BucketOrder bucketOrder = BucketOrder.key(true);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifying the ordering for the buckets.

Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
@wrigleyDan wrigleyDan merged commit efaa6dd into main Dec 10, 2024
18 checks passed
@wrigleyDan wrigleyDan deleted the demo-changes branch December 10, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants