# Tag Cloud for match phrases

**URL:** <https://discuss.elastic.co/t/tag-cloud-for-match-phrases/164490>\
**Category:** Elasticsearch\
**Created:** [January 16, 2019, 3:38pm UTC](https://discuss.elastic.co/t/tag-cloud-for-match-phrases/164490 "2019-01-16T15:38:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![angelogabeira](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@angelogabeira](https://discuss.elastic.co/u/angelogabeira)\
**Post date:** [January 16, 2019, 3:38pm UTC](https://discuss.elastic.co/t/tag-cloud-for-match-phrases/164490/1 "2019-01-16T15:38:53Z")

</div>

I'm a using Kibana to create a Tag Cloud and it is working fine at the moment. However, I want to show more than simple words. I'm trying to show expressions such as: cartao de credito, mensagem de erro, etc.

I tried using the Shingle Token Filter and a customized list of Stopwords. So when creating the index I changed the settings and created the analyzer and filters.

The result is not showing what I wanted. I used the analyze API to make things easier to test.

Here's the settings:

PUT /analisador\_test  
{  
"settings": {  
"analysis": {  
"analyzer": {  
"my\_analyzer": {  
"type": "custom",  
"tokenizer": "standard",  
"filter": [  
"lowercase",  
"filtro\_portugues",  
"asciifolding",  
"filtro\_separador"  
]  
}  
},  
"filter":{  
"filtro\_separador": {  
"type": "shingle",  
"max\_shingle\_size": 3,  
"min\_shingle\_size": 3,  
"output\_unigrams": false  
},  
"filtro\_portugues": {  
"type": "stop",  
"stopwords": ["o", "cliente"]  
}  
}  
}  
}  
}

POST /analisador\_test/\_analyze  
{  
"analyzer": "my\_analyzer",  
"text": "O cliente informa problema no cartão de crédito"  
}

The result is:  
"\_ \_ informa"  
"\_ informa problema"  
"informa problema no"  
"problema no cartao"  
"no cartao de"  
"cartao de credito"

Part of this result is OK but the first and second lines should not exist.

If I change the order of the filters in the settings, the STOPWORDS are not used and the results are:

"o cliente informa"  
"cliente informa problema"  
"informa problema no"  
"problema no cartao"  
"no cartao de"  
"cartao de credito"

Does anyone know if there is a way to accomplish a TAG CLOUD with short expressions (3 words)?

Just to inform that the TAG CLOUD is being made after analysing a text field that contains a lot of text.

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [January 16, 2019, 4:02pm UTC](https://discuss.elastic.co/t/tag-cloud-for-match-phrases/164490/2 "2019-01-16T16:02:38Z")

</div>

Recently [discussed on LinkedIn](https://www.linkedin.com/pulse/simple-way-improve-enterprise-search-nlp-significant-terms-gr%C3%B6nroos/)

Check out all the comments where we discussed pre-processsing text with python Vs elasticsearch shingling and significant\_text aggregation.

---

<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 13, 2019, 4:02pm UTC](https://discuss.elastic.co/t/tag-cloud-for-match-phrases/164490/3 "2019-02-13T16:02:43Z")

</div>

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