# Is there any ways to get Popular keywords?

**URL:** <https://discuss.elastic.co/t/is-there-any-ways-to-get-popular-keywords/86151>\
**Category:** Elasticsearch\
**Created:** [May 17, 2017, 5:35pm UTC](https://discuss.elastic.co/t/is-there-any-ways-to-get-popular-keywords/86151 "2017-05-17T17:35:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lael\_Moon](https://avatars.discourse-cdn.com/v4/letter/l/9d8465/32.png) [@Lael\_Moon](https://discuss.elastic.co/u/Lael_Moon)\
**Post date:** [May 17, 2017, 5:35pm UTC](https://discuss.elastic.co/t/is-there-any-ways-to-get-popular-keywords/86151/1 "2017-05-17T17:35:32Z")

</div>

Hello.  
I want to implement today's hot keyword.

== Here is my mapping data ==

```
{
          "content": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "date_format": {
            "type": "date",
            "format": "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis"
          },
          "title": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          }

```

====

I tried query like below.

```
{
    "aggs" : {
        "popular_keywords" : {
            "terms" : { "field" : "content",

            }
        }
    }
}

```

And i got error message.

`"Fielddata is disabled on text fields by default. Set fielddata=true on [content] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."`

I have no idea what to do next.  
Please help!

---

<div class="post-metadata">

**Author:** ![Lael\_Moon](https://avatars.discourse-cdn.com/v4/letter/l/9d8465/32.png) [@Lael\_Moon](https://discuss.elastic.co/u/Lael_Moon)\
**Post date:** [May 18, 2017, 7:50am UTC](https://discuss.elastic.co/t/is-there-any-ways-to-get-popular-keywords/86151/2 "2017-05-18T07:50:07Z")

</div>

Problem solved with fielddata=true.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 15, 2017, 7:50am UTC](https://discuss.elastic.co/t/is-there-any-ways-to-get-popular-keywords/86151/3 "2017-06-15T07:50:40Z")

</div>

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