# Special char is parsing but not searching

**URL:** https://discuss.elastic.co/t/special-char-is-parsing-but-not-searching/355847
**Category:** Kibana
**Created:** [March 20, 2024, 8:36pm UTC](https://discuss.elastic.co/t/special-char-is-parsing-but-not-searching/355847 "2024-03-20T20:36:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nkf\_123](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nkf_123/32/125692_2.png) [@nkf\_123](https://discuss.elastic.co/u/nkf_123)
#### Post date: [March 20, 2024, 8:36pm UTC](https://discuss.elastic.co/t/special-char-is-parsing-but-not-searching/355847/1 "2024-03-20T20:36:16Z")

</div>

I have defined my analyzer as below:  
"analysis": {  
"analyzer": {  
"my\_ngram\_analyzer": {  
"filter": [  
"lowercase"  
],  
"type": "custom",  
"tokenizer": "my\_ngram\_tokenizer"  
}  
},  
"tokenizer": {  
"my\_ngram\_tokenizer": {  
"token\_chars": [  
"letter",  
"digit",  
"punctuation",  
"symbol",  
"custom"  
],  
"custom\_token\_chars": [  
"#"  
],  
"min\_gram": "1",  
"type": "ngram",  
"max\_gram": "2"  
}  
}  
},

And I did a test to analyse the special character within my data:  
POST .ds-os-logs-test-2024.03.19-000027/\_analyze  
{  
"analyzer": "my\_ngram\_analyzer",  
"text": "## For ObjectID:332270810058 getting trace BV ID:212318 BV Value:337040313158 Found in Cache?:T ----- PL/SQL Call Stack -----"  
}

{  
"tokens": [  
{  
"token": "#",  
"start\_offset": 0,  
"end\_offset": 1,  
"type": "word",  
"position": 0  
},  
{  
"token": "##",  
"start\_offset": 0,  
"end\_offset": 2,  
"type": "word",  
"position": 1  
},  
{  
"token": "#",  
"start\_offset": 1,  
"end\_offset": 2,  
"type": "word",  
"position": 2  
},  
{  
"token": "f",  
"start\_offset": 3,  
"end\_offset": 4,  
"type": "word",  
"position": 3  
},  
{  
"token": "fo",  
"start\_offset": 3,  
"end\_offset": 5,  
"type": "word",  
"position": 4  
},  
{  
"token": "o",  
"start\_offset": 4,  
"end\_offset": 5,  
"type": "word",  
"position": 5  
},  
{  
"token": "or",  
"start\_offset": 4,  
"end\_offset": 6,  
"type": "word",  
"position": 6  
},  
.  
.  
.  
.

But when I search it in kibana discover panel in the search bar as os.log.message : "##" or ## or '/#/' or "#", I got no records.

My os.log.message field is of type 'text', I cannot change it to 'keyword' as the wildcard searching and even searching for numbers becomes difficult. I need it to be in 'text'.

Now that I know my analyser is accepting # why is it not searching when done on kibana discover panel?

[@elastic\_team](https://discuss.elastic.co/groups/elastic_team) kindly advise.

---

<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: [April 17, 2024, 8:36pm UTC](https://discuss.elastic.co/t/special-char-is-parsing-but-not-searching/355847/2 "2024-04-17T20:36:31Z")

</div>

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