Skip to content

Conversation

@Hohol
Copy link
Contributor

@Hohol Hohol commented Jul 18, 2019

Closes #36642

@Hohol Hohol changed the title Allow Bucket Script aggregation to reference on string results [WIP] Allow Bucket Script aggregation to reference on string results Jul 18, 2019
@Hohol
Copy link
Contributor Author

Hohol commented Jul 18, 2019

@polyfractal, I experimented a bit to see if the issue can be solved without big refactoring. This solution worked for my simple use case. Probably, it'll break if you try to do anything else :)
What do you think about the idea?

@cbuescher cbuescher added the :Analytics/Aggregations Aggregations label Jul 19, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo

@cbuescher cbuescher added the WIP label Jul 19, 2019
@polyfractal
Copy link
Contributor

Hmm, need to think on this one. A potential concern is that this would allow bucket scripts to return strings (great!) but since none of the other pipelines or framework were adjusted, nothing else could use the generated values. E.g. a second bucket_script referencing this one would break because it expects a double.

It might be an acceptable middle ground if well documented, or maybe too user-unfriendly. Not sure, I'm going to mark this as team-discuss to see what the rest of the team thinks.

@RubieV
Copy link

RubieV commented Aug 30, 2019

This would work very well for us, in a use-case where we want to apply a script returning a category, of type String, based on both numeric values as well as string matches.

@rjernst rjernst added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label May 4, 2020
@elasticsearchmachine elasticsearchmachine changed the base branch from master to main July 22, 2022 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/Aggregations Aggregations Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) team-discuss WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow Bucket Script aggregation to reference on string results

6 participants