Kibana Conditional Terms Aggregation

I am using Terms Aggregation for my visualisation
and splitting the series on a keyword.
some terms in x-axis dos not have the field on which split is applied. Can i order the aggregation in such a way that only the terms with that specific field shows up First in the axis or any way to conditionally remove them.

some terms in x-axis dos not have the field on which split is applied

As i understand it, you're using the terms agg to split the x-axis, and the field value is sparse (that is, some documents do not contain that field).

Be aware that when you query Elasticsearch and aggregate or filter on a field, it will drop documents that don't have a value for that field. Since this is what Kibana is doing, that's what is happening to the documents; they are silently ignored.

Can i order the aggregation in such a way that only the terms with that specific field shows up First in the axis

By default, documents without that field are ignored. There is no way to get them to show up.

I suspect that because you are asking about showing fields first, that maybe I'm misunderstanding what you're trying to do. Are you asking if you can sort the values on the x-axis, so that the terms are shown in a specific order? If so, I don't believe so, you can only order the values based on a metric (think a number value) or alphabetically.

or any way to conditionally remove them

If you're asking if you can remove certain values from the x-axis, you can do this by creating a filter. Use the "Add filter" interface at the top to remove values from the results, and they will not show up anymore.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.