But i want a filter value in kibana or logstash that both the service.keyword output as you see should be merged to a new , Which will be called as -- > FIRST NID CARD and also the count of both the values should be added to it.
@Luca_Belluccini If you are running into issues with value count in TSVB then it sounds like a potential bug... currently TSVB is the one place we expect value count aggs to work in Kibana.
There is an Aggs Support in Kibana meta issue which is helpful in understanding where you can expect to find support for various agg types: https://github.com/elastic/kibana/issues/58628
@Matish_Bhuyan , while your question helped us to identify a Kibana issue (Thanks )
If I understood correctly from the first question, you have/had documents such as:
PUT discuss/_doc/1
{
"timestamp" : "2020-01-19T03:26:21.326Z",
"fruits": "banana"
}
PUT discuss/_doc/2
{
"timestamp" : "2020-01-19T03:26:21.326Z",
"fruits": "banana"
}
PUT discuss/_doc/3
{
"timestamp" : "2020-01-19T03:26:21.326Z",
"fruits": "apple"
}
PUT discuss/_doc/4
{
"timestamp" : "2020-01-19T03:26:21.326Z",
"fruits": ["apple", "banana", "orange"]
}
And you wanted to get 3 as count, instead of obtaining the count, split by terms.
The correct way to handle this, without modifying the structure of the document with Logstash, would be to use value_count aggregation.
Once the bug I just opened will be fixed, you'll be able to select service.keyword and it would output the count of values, without splitting them in the different values.
You will see we obtain 6 (given the demo data I've shared).
That said, you are free to solve the issue using Logstash, but you have to know all the different values you might have in the field, which is not always possible.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.