In kibana, I don't have an option for "message", but I do see an option for "message.keyword" however, it shows no data. Other fields like "type.keyword" seem to work. Is there something wrong with my configuration for the "message" text field?
Can you elaborate on your use case? I can't see how a word cloud would render nicely with such large terms. Maybe there is another way to achieve your goal.
I see, that's not what the terms aggregation will do - it will match the whole message as a single value (so I guess each one will occur exactly once) - e.g. "This is a very very long message" is a single term, it won't split "This" and "very" and so on.
I think using "significant terms" on the text field (message, not message.keyword) is what you want - it show you words commonly used in the message field
One final question. message doesn't show up in the kibana dropdown. I tried turning on fielddata but that didn't seem to work. Any idea on why it wouldn't appear in kibana?
Thanks for all the help.
Edit: i saw that the field wasn't aggregateable in the in the index patterns. I delete and readded the pattern and it says message is aggregatable and shows up iin kibana but still doesn't extract any significant terms.
Ah, I made a mistake here as well. A bunch of things to clear up:
On changing the mapping you need to refresh the index pattern in Kibana so it can pick up the changes (recreating works as well)
In your case "Terms" is probably the right thing, if used on a "text" field with fielddata enabled it does what you expect (showing the most common words in your document) - significant terms is just a special case of that highlighting unusually common terms in relation to your current query (doesn't make much sense without a query)
How did you turn on fielddata? You might need to reindex your data so it's properly populated
An example that worked for me:
Create the mapping and ingest data
PUT textindex2
{
"mappings": {
"properties": {
"message": {
"type": "text",
"fielddata": true
}
}
}
}
POST textindex2/_doc
{ "message": "This is my message" }
POST textindex2/_doc
{ "message": "This is my other message" }
Create index pattern for this index
Create tag cloud based on "terms" aggregation on the message field
Thank you again. I had to re-index my data. The terms aggregation works now. It's not very helpful since the top terms are random numbers and things but I guess that is expected.
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.