# Include Pattern in Kibana visualization

**URL:** https://discuss.elastic.co/t/include-pattern-in-kibana-visualization/184220
**Category:** Kibana
**Created:** [June 4, 2019, 3:35pm UTC](https://discuss.elastic.co/t/include-pattern-in-kibana-visualization/184220 "2019-06-04T15:35:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![aeljazouli](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@aeljazouli](https://discuss.elastic.co/u/aeljazouli)
#### Post date: [June 4, 2019, 3:35pm UTC](https://discuss.elastic.co/t/include-pattern-in-kibana-visualization/184220/1 "2019-06-04T15:35:04Z")

</div>

Hey everyone,

Je veux calculer le nombre de mots contenus dans un champ "word". Dans cet exemple, il m'affiche 8 mots différents qui sont sur un document d'ID=1.

 ![1](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d6f70ff76e99fe42249202c3deae6fb9b650c1a6.png)

I'm trying to calculate the number of words on a dictionary that I want to specify in include pattern. But I do not know how to set multiple values for the "word" field.

it works perfectly when I use a single value (see the image below). I put "bonjour" in include.

![2](https://us1.discourse-cdn.com/elastic/original/3X/9/4/94c61b8f577159e8a93f1b61bf0a6661f8733e50.png)

---

<div class="post-metadata">

### Author: ![jen-huang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jen-huang/32/74327_2.png) [@jen-huang](https://discuss.elastic.co/u/jen-huang)
#### Post date: [June 4, 2019, 11:22pm UTC](https://discuss.elastic.co/t/include-pattern-in-kibana-visualization/184220/2 "2019-06-04T23:22:38Z")

</div>

Hi, the Include and Exclude fields here expect regex patterns. So to search multiple words, you can do `bonjour|hello|hola`, or any other regex pattern such as `bon.*` which will match bonjour and bonsoir.

---

<div class="post-metadata">

### Author: ![aeljazouli](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@aeljazouli](https://discuss.elastic.co/u/aeljazouli)
#### Post date: [June 7, 2019, 9:46am UTC](https://discuss.elastic.co/t/include-pattern-in-kibana-visualization/184220/3 "2019-06-07T09:46:56Z")

</div>

Hi @jen-huang,

Thanks for your help !!! it did the job. I was able to display a simple table like this one that allows to count the number of mandatory words (That I defined in include pattern).

![1](https://us1.discourse-cdn.com/elastic/original/3X/9/c/9c9bab20c5d7288f96331ad4a1f214ee3ce800e8.png).

In fact, I'm looking to go further in my visualizations. I do not know that there is a possibility for example to display the words that I defined in include pattern on a visualization (dashboard) and check or uncheck them (or add / remove). To make the task easy to an enduser.

I use this file with Elasticsearch :

> {  
> "meta":{  
> "ID\_FICHIER":127743,  
> "DATE\_APPEL":"2019-06-06 10:22:42",  
> "SITE":"Casablanca",  
> "ID\_AGENT":2053275,  
> "PRESTA":"WH",  
> "TYPE\_PRESTATION":"MES",  
> "ORIGINE":"Appel sortant",  
> "audio\_length":819.657,  
> "ID\_BS":"D0E0628652736"  
> },  
> "transcription":[  
> {  
> "confidence":0.985514,  
> "word":"energie"  
> },  
> {  
> "confidence":0.633511,  
> "word":"madame"  
> },  
> {  
> "confidence":0.533511,  
> "word":"pleine"  
> },  
> {  
> "confidence":0.767069,  
> "word":"oui"  
> },  
> {  
> "confidence":0.901756,  
> "word":"non"  
> },  
> {  
> "confidence":0.901756,  
> "word":"offre"  
> },  
> {  
> "confidence":0.901756,  
> "word":"atome"  
> },  
> {  
> "confidence":0.901756,  
> "word":"direct"  
> },  
> {  
> "confidence":0.901756,  
> "word":"mechant"  
> },  
> {  
> "confidence":0.901756,  
> "word":"concurrent"  
> }  
> ]  
> }

---

<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: [July 5, 2019, 9:46am UTC](https://discuss.elastic.co/t/include-pattern-in-kibana-visualization/184220/4 "2019-07-05T09:46:57Z")

</div>

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