Significant Terms "No Results Found"?

I'm trying to use the "Significance Terms" aggregation on Twitter post, however, each time I try to I receive "No Results Found" (picture attached).

When I try to use the Significant Terms aggregation on the text in the tweet documents it only gives me the option for "text.keyword" instead of "text" field, which I believe the documentation says I need for Significant Term Aggregation? (i'm unsure about this)?

Here is the index mapping for my index, along with a few example documents.

Index:
"text" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}

Please note that my text.keywords field actually displays the entire tweet instead of the specific tokens as well? I'm unsure why this is because according to the documentation, I believe the analyzer is suppose to tokenize the text field by default?

Can someone help me figure out what I'm doing wrong?

Keyword fields index the number of unique documents for each unique value of that field. They should be used for fields containing structured data such as email addresses, IP addresses, status codes, etc.

In order to do a Significant Terms query on a text field, you'll need to enable fielddata on the mappings. For example:

PUT /twitter_stream/_mapping
{
  "properties": {
    "text": {
      "type": "text",
      "fielddata": true,
      "fields": {
        "keyword": {
          "type": "keyword",
          "ignore_above": 256
        }
      }
    }
  }
}

Once you've done that, go to Management > Index Patterns and refresh the index pattern to make Kibana re-read the mappings. Now the text field should show up in the Significant Terms dropdown.

You may not get any results because there is only a single document in the index, so no words are "significant". Add a few more documents to start getting results.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.