-
Notifications
You must be signed in to change notification settings - Fork 25.2k
server side scripting #7547
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
Comments
Are you talking about things like this: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#_script_11 I think IMHO that we already have that for many aggregations. Closing. Feel free to reopen and add more details about what you expect if needed. |
to put it in simple words stored procedure kind of feature where we can store aggregated values in variable and then do some complex logic over that. |
I think it may already being considered but I would like agg metrics to support expressions based on other metrics in the same bucket. Say I want to calculate special kind of average based on several sums and counts If calculated metrics could refernce outside of their bucket to child buckets or parent ones it would be even mote powerful but will require 2 step processing I guess |
Given that documents are distributed, the only efficient way to execute document level scripts is "row by row". We provide a scripted metric aggregation, and will probably add a scripted bucket aggregation, plus #8110 will add post-agg manipulation. We don't want to allow arbitrary script execution, especially scripts that could maintain state, as they could be very costly indeed. Whatever we add needs to work efficiently in a distributed system. Unless you have suggestions for types of scripts, I think this ticket is already solved by the above. thanks |
Scripted upserts also allow you to perform aggregation of multiple events (e.g. web accesses) into a single document that aggregates them based on a common key (e.g. a session ID). The scripts can include logic that derives attributes for this entity based on new data and existing data e.g. update a web session duration or flag if the user looks to be a bot (accessed robots.txt, downloads no CSS/images) |
how about adding server side scripting capability similar to the lines of stored proc in SQL which will make ES more powerful analytics engine and avoids distributing logic between server side client side
The text was updated successfully, but these errors were encountered: