111485
(hjgo)
June 23, 2021, 3:45pm
1
I want to separate STRING into ARRAY and get a count.
The example is as follows. (Table)
Name Count
MG3 | 2
MG4 | 1
When set through KIBANA LENS, it is only enabled as a keyword, and when set, only the count of record option is enabled.
When set to count of record, of course, this data changes as below.
MG3 | 1
MG4 | 1
Is there a good way?
wylie
(Wylie Conlon)
June 23, 2021, 3:50pm
2
Hi, as you might be aware all mapping types in Elasticsearch are arrays due to the way Elasticsearch works. There is an aggregation that's able to calculate the count of the array field, which is called Value Count, but it's not supported by Lens .
As a workaround, you can create a scripted field that returns the size of the grade
values array, and then take the sum in Lens.
system
(system)
Closed
July 21, 2021, 3:50pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.