# How to search special characters in elasticsearch

**URL:** https://discuss.elastic.co/t/how-to-search-special-characters-in-elasticsearch/251997
**Category:** Elasticsearch
**Created:** [October 14, 2020, 6:54am UTC](https://discuss.elastic.co/t/how-to-search-special-characters-in-elasticsearch/251997 "2020-10-14T06:54:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![yen\_l\_ng\_th](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yen_l_ng_th/32/65467_2.png) [@yen\_l\_ng\_th](https://discuss.elastic.co/u/yen_l_ng_th)
#### Post date: [October 14, 2020, 6:54am UTC](https://discuss.elastic.co/t/how-to-search-special-characters-in-elasticsearch/251997/1 "2020-10-14T06:54:43Z")

</div>

I want query terms name in string "9.999%". But it not working.  
setting document  
'analysis' =\> [  
'analyzer' =\> [  
'default' =\> [  
'type' =\> 'custom',  
'tokenizer' =\> 'whitespace',  
'filter' =\> [  
'lowercase',  
'word\_delimiter',  
],  
],  
],  
],

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [October 14, 2020, 6:59am UTC](https://discuss.elastic.co/t/how-to-search-special-characters-in-elasticsearch/251997/2 "2020-10-14T06:59:58Z")

</div>

This is how it's analyzed:

```auto
POST _analyze
{
  "text": "9.999%",
  "tokenizer": "whitespace",
  "filter": ["lowercase", "word_delimiter"]
}

```

Gives:

```auto
{
  "tokens" : [
    {
      "token" : "9",
      "start_offset" : 0,
      "end_offset" : 1,
      "type" : "word",
      "position" : 0
    },
    {
      "token" : "999",
      "start_offset" : 2,
      "end_offset" : 5,
      "type" : "word",
      "position" : 1
    }
  ]
}

```

I'm not exactly sure about your use case.

Could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

---

<div class="post-metadata">

### Author: ![yen\_l\_ng\_th](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yen_l_ng_th/32/65467_2.png) [@yen\_l\_ng\_th](https://discuss.elastic.co/u/yen_l_ng_th)
#### Post date: [October 15, 2020, 2:40am UTC](https://discuss.elastic.co/t/how-to-search-special-characters-in-elasticsearch/251997/3 "2020-10-15T02:40:44Z")

</div>

Thanks. I understand

---

<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: [November 12, 2020, 2:40am UTC](https://discuss.elastic.co/t/how-to-search-special-characters-in-elasticsearch/251997/4 "2020-11-12T02:40:52Z")

</div>

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