I've an index with the following fields:
In these fields, search terms as text is stored.
In Kibana I would like to reach a histogram as follows:
y axis: number of search requests
x axis: count of the four fields above
How can I reach this?
I've an index with the following fields:
In these fields, search terms as text is stored.
In Kibana I would like to reach a histogram as follows:
y axis: number of search requests
x axis: count of the four fields above
How can I reach this?
I think I understand your scenario. It sounds like you have a field per language, and are filling that field in, so if I search in Chinese, it will be captured in the ch
field of a document, but the other language fields (e.g. en
) will be blank. Is that right? And you're basically trying to show a bar chart of the top languages used in your platform?
Is that right? If so, I wouldn't store each language as its own property. Instead, I'd create a lang
property or something, and its value would be the language used (e.g. "en"
). Then, creating your bar chart becomes a trivial terms operation.
Thanks Chris!
You have understand the scenario correctly.
This means, the only way is to change the incoming data structure?
Is there an alternative way in Elasticsearch available without changing the incoming data structure? I mean to stay with your example, to create a kind of a bucket for these different language fields?
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
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.