# Dot replace is not working

**URL:** <https://discuss.elastic.co/t/dot-replace-is-not-working/247481>\
**Category:** Elasticsearch\
**Created:** [September 4, 2020, 5:15am UTC](https://discuss.elastic.co/t/dot-replace-is-not-working/247481 "2020-09-04T05:15:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KrishK](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@KrishK](https://discuss.elastic.co/u/KrishK)\
**Post date:** [September 4, 2020, 5:15am UTC](https://discuss.elastic.co/t/dot-replace-is-not-working/247481/1 "2020-09-04T05:15:19Z")

</div>

Hi Support,

I have below configuration for index.

> PUT dottest  
> {  
> "settings":{  
> "index" : {  
> "number\_of\_shards" : 1,  
> "number\_of\_replicas" : 0  
> },  
> "analysis": {  
> "analyzer": {  
> "splchar\_analyzer": {  
> "tokenizer": "standard",  
> "char\_filter": [  
> "spl\_char\_filter"  
> ],  
> "filter": [  
> "lowercase"  
> ]  
> }  
> },  
> "char\_filter": {  
> "spl\_char\_filter": {  
> "type": "pattern\_replace",  
> "pattern": "\.",  
> "replacement": " "  
> }  
> }  
> }  
> },  
> "mappings": {  
> "properties": {  
> "text": {  
> "type": "text",  
> "analyzer": "splchar\_analyzer"  
> }  
> }  
> }  
> }

Its works while check by using below request.

> POST dottest/\_analyze  
> {  
> "analyzer": "splchar\_analyzer",  
> "text": """This is something 152045.525"""  
> }

I got below token, which is fine for me.

> {  
> "tokens" : [  
> {  
> "token" : "this",  
> "start\_offset" : 0,  
> "end\_offset" : 4,  
> "type" : "",  
> "position" : 0  
> },  
> {  
> "token" : "is",  
> "start\_offset" : 5,  
> "end\_offset" : 7,  
> "type" : "",  
> "position" : 1  
> },  
> {  
> "token" : "something",  
> "start\_offset" : 8,  
> "end\_offset" : 17,  
> "type" : "",  
> "position" : 2  
> },  
> {  
> "token" : "152045",  
> "start\_offset" : 18,  
> "end\_offset" : 24,  
> "type" : "",  
> "position" : 3  
> },  
> {  
> "token" : "525",  
> "start\_offset" : 25,  
> "end\_offset" : 28,  
> "type" : "",  
> "position" : 4  
> }  
> ]  
> }

While document insert via logstash script, it not spiting dot with space.  
Here is live index document example:

> {  
> "\_index" : "indexname",  
> "\_type" : "\_doc",  
> "\_id" : "1278041941",  
> "\_version" : 2,  
> "found" : true,  
> "took" : 142,  
> "term\_vectors" : {  
> "filecontent" : {  
> "field\_statistics" : {  
> "sum\_doc\_freq" : 2848226634,  
> "doc\_count" : 18534325,  
> "sum\_ttf" : 6310068234  
> },  
> "terms" : {  
> "5961.20" : {  
> "term\_freq" : 1,  
> "tokens" : [  
> {  
> "position" : 20,  
> "start\_offset" : 145,  
> "end\_offset" : 152  
> }  
> ]  
> },  
> "6119.27" : {  
> "term\_freq" : 1,  
> "tokens" : [  
> {  
> "position" : 23,  
> "start\_offset" : 167,  
> "end\_offset" : 174  
> }  
> ]  
> },  
> "6153.10" : {  
> "term\_freq" : 1,  
> "tokens" : [  
> {  
> "position" : 17,  
> "start\_offset" : 123,  
> "end\_offset" : 130  
> }  
> ]  
> },  
> **"6339.60"** : {  
> "term\_freq" : 1,  
> "tokens" : [  
> {  
> "position" : 14,  
> "start\_offset" : 101,  
> "end\_offset" : 108  
> }  
> ]  
> },  
> **"6819.20"** : {  
> "term\_freq" : 1,  
> "tokens" : [  
> {  
> "position" : 11,  
> "start\_offset" : 79,  
> "end\_offset" : 86  
> }  
> ]  
> },  
> "document" : {  
> "term\_freq" : 2,  
> "tokens" : [  
> {  
> "position" : 1,  
> "start\_offset" : 8,  
> "end\_offset" : 16  
> },  
> {  
> "position" : 3,  
> "start\_offset" : 22,  
> "end\_offset" : 30  
> }  
> ]  
> },  
> "for" : {  
> "term\_freq" : 1,  
> "tokens" : [  
> {  
> "position" : 5,  
> "start\_offset" : 34,  
> "end\_offset" : 37  
> }  
> ]  
> },  
> "hrs" : {  
> "term\_freq" : 5,  
> "tokens" : [  
> {  
> "position" : 10,  
> "start\_offset" : 71,  
> "end\_offset" : 74  
> },  
> {  
> "position" : 13,  
> "start\_offset" : 93,  
> "end\_offset" : 96  
> },  
> {  
> "position" : 16,  
> "start\_offset" : 115,  
> "end\_offset" : 118  
> },  
> {  
> "position" : 19,  
> "start\_offset" : 137,  
> "end\_offset" : 140  
> },  
> {  
> "position" : 22,  
> "start\_offset" : 159,  
> "end\_offset" : 162  
> }  
> ]  
> },  
> "is" : {  
> "term\_freq" : 1,  
> "tokens" : [  
> {  
> "position" : 4,  
> "start\_offset" : 31,  
> "end\_offset" : 33  
> }  
> ]  
> },  
> "labor" : {  
> "term\_freq" : 5,  
> "tokens" : [  
> {  
> "position" : 9,  
> "start\_offset" : 65,  
> "end\_offset" : 70  
> },  
> {  
> "position" : 12,  
> "start\_offset" : 87,  
> "end\_offset" : 92  
> },  
> {  
> "position" : 15,  
> "start\_offset" : 109,  
> "end\_offset" : 114  
> },  
> {  
> "position" : 18,  
> "start\_offset" : 131,  
> "end\_offset" : 136  
> },  
> {  
> "position" : 21,  
> "start\_offset" : 153,  
> "end\_offset" : 158  
> }  
> ]  
> },  
> "only" : {  
> "term\_freq" : 1,  
> "tokens" : [  
> {  
> "position" : 8,  
> "start\_offset" : 54,  
> "end\_offset" : 58  
> }  
> ]  
> },  
> "purpose" : {  
> "term\_freq" : 1,  
> "tokens" : [  
> {  
> "position" : 7,  
> "start\_offset" : 46,  
> "end\_offset" : 53  
> }  
> ]  
> },  
> "testing" : {  
> "term\_freq" : 2,  
> "tokens" : [  
> {  
> "position" : 0,  
> "start\_offset" : 0,  
> "end\_offset" : 7  
> },  
> {  
> "position" : 6,  
> "start\_offset" : 38,  
> "end\_offset" : 45  
> }  
> ]  
> },  
> "this" : {  
> "term\_freq" : 1,  
> "tokens" : [  
> {  
> "position" : 2,  
> "start\_offset" : 17,  
> "end\_offset" : 21  
> }  
> ]  
> }  
> }  
> }  
> }  
> }

Highlighted text not spited.

Is there any issue in mapping or in logstash?  
Can anyone help me on this issue?

Thanks

---

<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:** [October 2, 2020, 5:15am UTC](https://discuss.elastic.co/t/dot-replace-is-not-working/247481/2 "2020-10-02T05:15:22Z")

</div>

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