# Visualization of the most frequent words

**URL:** <https://discuss.elastic.co/t/visualization-of-the-most-frequent-words/295494>\
**Category:** Kibana\
**Created:** [January 26, 2022, 5:26pm UTC](https://discuss.elastic.co/t/visualization-of-the-most-frequent-words/295494 "2022-01-26T17:26:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![meyer1](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@meyer1](https://discuss.elastic.co/u/meyer1)\
**Post date:** [January 26, 2022, 5:26pm UTC](https://discuss.elastic.co/t/visualization-of-the-most-frequent-words/295494/1 "2022-01-26T17:26:59Z")

</div>

Hello ! i am new to kibana and elastic

My need is to display the most used words in a text type field on several documents.

Is it possible to do this with kibana and elastic? If so, how is this possible? With scripted fields? Or tokenizers?

Please help me

Thank you in advance for your answers

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [January 26, 2022, 5:59pm UTC](https://discuss.elastic.co/t/visualization-of-the-most-frequent-words/295494/2 "2022-01-26T17:59:29Z")

</div>

I just remembered and correct the reply.

If you set `fielddata: true` in text field, you can use visualization \> aggregation based \> Tag cloud.

```auto
PUT /test_field_data
{
  "mappings": {
    "properties": {
      "mytext":{
        "type":"text",
        "fielddata": true
      }
    }
  }
}

POST /test_field_data/_bulk
{"index":{}}
{"mytext": "Visualization of the most frequent words."}
{"index":{}}
{"mytext": "Hello ! i am new to kibana and elastic."}
{"index":{}}
{"mytext": "My need is to display the most used words in a text type field on several documents."}
{"index":{}}
{"mytext": "Is it possible to do this with kibana and elastic? If so, how is this possible? With scripted fields? Or tokenizers?"}
{"index":{}}
{"mytext": "Please help me Thank you in advance for your answers"}

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/4/b46b45c696e32ca33e148d0b6b62a43caa5ad5d3.png)

---

<div class="post-metadata">

**Author:** ![meyer1](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@meyer1](https://discuss.elastic.co/u/meyer1)\
**Post date:** [January 26, 2022, 6:36pm UTC](https://discuss.elastic.co/t/visualization-of-the-most-frequent-words/295494/3 "2022-01-26T18:36:55Z")

</div>

Hello, thank you for your answer, it helps me a lot!

Is it possible to add an analyzer to, for example, remove stopwords (ex: "the") from the graph?

---

<div class="post-metadata">

**Author:** ![Tomo\_M](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@Tomo\_M](https://discuss.elastic.co/u/Tomo_M)\
**Post date:** [January 26, 2022, 6:54pm UTC](https://discuss.elastic.co/t/visualization-of-the-most-frequent-words/295494/4 "2022-01-26T18:54:13Z")

</div>

Yes, you can. (I'm not sure why, setting only index default analyzer doesn't work for me.) In ES there are a lot of built-in token filters which you can use.

> **[Specify an analyzer | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/specify-analyzer.html#specify-index-time-analyzer)**

```auto
PUT /test_field_data
{
  "settings": {
    "analysis": {
      "analyzer": {
        "my_analyzer":{
          "type": "custom",
          "tokenizer": "standard",
          "filter":[
            "lowercase",
            "stop"]
        }
      }
    }
  },
  "mappings": {
    "properties": {
      "mytext":{
        "type":"text",
        "fielddata": true,
        "analyzer": "my_analyzer"
      }
    }
  }
}

```

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/a/cae1308a1364b799a2da35bc25dce1fe0898768b.png)

If there are some problem about performance or memory consumption, the plan below which I deleted could be a next choice.

> ~~If~~~~ you ~~~~are~~~~ using ~~~~space~~~~ - ~~~~separeted~~~~ language ~~~~,~~  ~~one~~~~ simple ~~~~solution~~~~ is ~~~~to~~~~ use ~~~~the~~~~ ingest ~~~~pipeline~~~~ with ~~~~split~~~~ processor ~~~~to~~~~ split ~~~~texts~~~~ with ~~~~blanks~~~~ , ~~~~ then ~~~~set~~~~ them ~~~~into~~~~ keyword ~~~~field~~~~ in ~~~~array~~~~ and ~~~~visualize~~~~ the ~~~~field~~~~ using ~~~~Tag~~~~ cloud ~~~~.~~  ~~Unfortunately~~~~ , ~~~~ this ~~~~method~~~~ does ~~~~not~~~~ utilize ~~~~stemmer~~~~ or ~~~~normalizer~~~~ , ~~~~ stop ~~~~word~~~~ filter ~~~~.~~~~. ~~~~.~~~~ etc ~~~~.~~

---

<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:** [February 23, 2022, 6:54pm UTC](https://discuss.elastic.co/t/visualization-of-the-most-frequent-words/295494/5 "2022-02-23T18:54:31Z")

</div>

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