-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
script attribute for terms panel #971
Comments
Because kibana talks directly to elasticsearch we advise users to disable dynamic scripting for security reasons. Once elasticsearch has a safer scripting model we can revisit script support in kibana. I'll leave this open as a feature request, but using MVEL from the browser is not feasible right now. |
This can be done safely by creating static scripts which are placed on all of the elasticsearch nodes, and then called in a query. |
I have a working implementation of #826, with script.disable_dynamic: true enabled on all nodes. |
I think this merge means that Elasticsearch now has sandboxed scripting (or will soon): Does this mean Kibana might be able to get this enhancement? I wish for it every day. |
Is this merge already done, does elastic search have this feature??? |
We've added script fields to the roadmap so I'm closing this issue. See #1537 to keep tabs on it. |
The
terms
facet in Elasticsearch can take ascript
attribute, to perform an action on a field before creating the results. This is handy where you want to extract a string from a field with a regex and then generate the top terms, eg:This takes everything in the matching group, and uses that to generate the top terms.
Perhaps another field in the panel editor, where someone can enter:
Starting job ([a-zA-Z0-9]*)
would be sufficient? I can hack this into
src/app/panels/terms/module.js
but not in a clean way yet.Additionally, in the above example, is the
limit
filter. On huge data sets, this can be really helpful when you just want to get a rough approximation of the top terms, rather than an exact count which could take a long time to gather.The text was updated successfully, but these errors were encountered: