Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
520 views
in Technique[技术] by (71.8m points)

elasticsearch - Aggregate term in multiple fields Kibana

I have a large list of terms that can exist in multiple fields. I want to figure out the count for each one of these terms across all the fields. for example:

fields: [category1, category2, categroy3]
terms: [car, truck, motorcycle]

These terms can exist in each of the three fields.

doc1:{category1:null,category2'car', categroy3:'truck'}
doc2:{category1:'truck',category2:null, categroy3:'truck'}
doc3:{category1:'motorcycle',category2'car', categroy3:'truck'}

I want to create a bar chart that gives a total count of how many times car/truck/motorcycle appear in ALL the fields.

count(truck) = 4
count(car) = 2
count(motorcycle) = 1

How do I describe this in Kibana to produce a barchart?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...