-
Notifications
You must be signed in to change notification settings - Fork 29
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 the ability to parse aggregations with OpenSearch #1082
Add the ability to parse aggregations with OpenSearch #1082
Conversation
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.
Couple minor suggestions - only major issue I noticed is the ObjectMapper initialization
astra/src/main/java/com/slack/astra/logstore/search/LogIndexSearcherImpl.java
Outdated
Show resolved
Hide resolved
astra/src/main/java/com/slack/astra/logstore/search/SearchResultAggregatorImpl.java
Outdated
Show resolved
Hide resolved
astra/src/main/java/com/slack/astra/logstore/search/SearchResultAggregatorImpl.java
Outdated
Show resolved
Hide resolved
if (!searchRequest.getAggregationJson().isEmpty()) { | ||
SearchModule searchModule = new SearchModule(Settings.EMPTY, List.of()); | ||
try { | ||
ObjectMapper objectMapper = new ObjectMapper(); |
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.
Object mappers should only be initialized once - consider refactoring this so that these initialization for mappers/parsers only have to be paid one time at class construction.
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, with Bryan's comments
Closes #629 |
Closes #628 |
…com:slackhq/kaldb into ksammons-parse-aggregations-with-opensearch
Summary
This PR adds the ability to parse aggregations with OpenSearch when the optional feature flag
astra.query.useOpenSearchAggregationParsing
is enabled. This follows the same pattern as the query refactor we did awhile back, keeping both the old parsing and new parsing paths in the code, and only switching between based on the feature flag. As such it should be reasonably inert and safe to deploy.I also did some minor fixes to to the changes made in #1081, and added some tests; both of which were missed due to time constraints.
Requirements