# Custom analyzer and char\_group tokenizer - can't search for terms with dot

**URL:** <https://discuss.elastic.co/t/custom-analyzer-and-char-group-tokenizer-cant-search-for-terms-with-dot/163008>\
**Category:** Elasticsearch\
**Created:** [January 4, 2019, 8:45pm UTC](https://discuss.elastic.co/t/custom-analyzer-and-char-group-tokenizer-cant-search-for-terms-with-dot/163008 "2019-01-04T20:45:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mad\_dog](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@mad\_dog](https://discuss.elastic.co/u/mad_dog)\
**Post date:** [January 4, 2019, 8:45pm UTC](https://discuss.elastic.co/t/custom-analyzer-and-char-group-tokenizer-cant-search-for-terms-with-dot/163008/1 "2019-01-04T20:45:17Z")

</div>

Hi,

I just added custom analyzer with char\_group tokenizer to my index and I was supprised when I found out that I'm able to include in searches all characters specified in tokenize\_on\_chars except dot. Obviously all the characters are stripped when tokens are created so I would expect that either I need to specify in search term exact tokens that were created or I can include any of characters that were stripped when tokenizing. So for example if I would search for 2019-0 on a field that consits date in format 2019-01-04 it will find it out. On the other side when I would search for 2019.0 on a field that consists date in format 2019.01.04 that it will not find it.  
So my question is if it's possible to include dots in searches?

My index looks like this:

```
PUT _template/template_name
{
  "index_patterns": ["template_pattern-*"],
  "settings" : {
    "index" : {
      "number_of_shards" : "1",
      "analysis": {
        "filter": {
          "autocomplete_filter": {
            "type": "edge_ngram",
            "min_gram": 1,
            "max_gram": 30
          }
        },
        "analyzer": {
          "my_custom_analyzer": {
            "type": "custom",
            "tokenizer": "my_tokenizer",
            "filter": [
              "lowercase",
              "autocomplete_filter"
            ]
          }
        },
        "tokenizer": {
          "my_tokenizer": {
            "type": "char_group",
            "tokenize_on_chars": ["whitespace", "-", "\n", "[", "]", ".", ",", ":", ";", "/" ]
          }
        }
      }
    }
  }
```

---

<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 1, 2019, 8:45pm UTC](https://discuss.elastic.co/t/custom-analyzer-and-char-group-tokenizer-cant-search-for-terms-with-dot/163008/2 "2019-02-01T20:45:17Z")

</div>

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