-
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
Include and Exclude params on terms agg #1660
Conversation
@@ -36,9 +37,12 @@ define(function (require) { | |||
if (param.name === 'field') { | |||
return new FieldAggParam(param); | |||
} | |||
else if (param.options) { | |||
else if (param.type === 'optioned') { |
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.
I'm not a fan of specifying the 'optioned' param here, primarily because of the hard link it creates between the param "DSL" and the implementation. For the most part, I would like the param classes to be hidden from the params themselves... does that make sense?
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.
It does, but I needed a way to specify the new regex param type, and since it's called a "param type", it made sense to use type: regex
- and to keep it consistent, I changed the other existing type as well. I'm open to other ideas though.
I've noticed an interesting anomaly, but I think it's just an ES thing... Here, the purple bar has no value, no label in the legend or the tooltip and is just a count. I believe what happens is that there are no results when excluding |
Ready for review, unless @spenceralger is really against the whole param |
I say it's a bug. If the two regexp instead created buckets with a single document the graph would like much different. |
Also, I'm fine with the type thing. Can't think of a better way to do it. |
I personally don't like the array of checkboxes, its messy. Maybe a select box that adds them to a list on select? I also think the whole thing should be hidden under an "advanced" section |
Select2's tagging mode is a good example: https://ivaynberg.github.io/select2/#tags |
That's coming in the next iteration, with the rest of the advanced stuff that's been mentioned before
Indeed it is! Going to implement that. |
Added the advanced panel and fixed some style issues on the chosen stuff. @spenceralger @rashidkpc any reason I shouldn't merge this? |
will review today |
LGTM, need to merge with master though |
use custom chosen styles to fix them further
show it when there are advanced options toggle show/hide based on the advanced toggle scope flag
fixed by my PR accepted on bootstrap-chosen
only loop through params once more understandable separation of basic and advanced
Include and Exclude params on terms agg
Closes #1616 - precursor to #1527
Adds exclude and include params to the terms agg builder
regex
agg typeregular expression
editorRegexAggParam
classlabel
filter with testsThe label filter was added so I could use the aggParam name as the field label - that filter may be useful elsewhere, and could probably use some extending.