# Ngram Analyze not working for forward slash '/'

**URL:** <https://discuss.elastic.co/t/ngram-analyze-not-working-for-forward-slash/131866>\
**Category:** Elasticsearch\
**Created:** [May 15, 2018, 7:23am UTC](https://discuss.elastic.co/t/ngram-analyze-not-working-for-forward-slash/131866 "2018-05-15T07:23:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![veerabhadraiah](https://avatars.discourse-cdn.com/v4/letter/v/e495f1/32.png) [@veerabhadraiah](https://discuss.elastic.co/u/veerabhadraiah)\
**Post date:** [May 15, 2018, 7:23am UTC](https://discuss.elastic.co/t/ngram-analyze-not-working-for-forward-slash/131866/1 "2018-05-15T07:23:43Z")

</div>

Hi ,

Created index with ngram analyser

```auto
POST my_index

{
            "settings": {
              
                "analysis": {
                  "filter": {
                     "nGram_filter": {
                        "type": "nGram",
                        "min_gram": 3,
                        "max_gram": 3,
                        "token_chars": [
                           "letter",
                           "digit",
                           "punctuation",
                           "symbol",
                           "whitespace"
                        ]
                     }
                  },
                  "analyzer": {
                     "nGram_analyzer": {
                        "type": "custom",
                        "tokenizer": "standard",
                        "filter": [
                           "lowercase",
                           "asciifolding",
                           "nGram_filter"
                        ]
                     }
                  }
               }
            },
            "mappings": {
                "doc": {
                  "dynamic_templates": [
                    {
                      "full_name": {
                        "path_match": "name.*",
                        "mapping": {
                          "type": "text",
                          "term_vector": "yes",
                          "analyzer": "nGram_analyzer",
                          "index": true,
                          "copy_to": "full_name"
                        }
                      }
                    }
                  ]
                }
            }
        }

```

Using analyser 'nGram\_analyzer'

```auto
POST my_index/_analyze
{
"analyzer": "nGram_analyzer",
  "text": "26/12/2014"
}

```

```auto
OUTPUT

{  
   "tokens":[  
      {  
         "token":"201",
         "start_offset":6,
         "end_offset":10,
         "type":"<NUM>",
         "position":2
      },
      {  
         "token":"014",
         "start_offset":6,
         "end_offset":10,
         "type":"<NUM>",
         "position":2
      }
   ]
}

```

ngram Analyser not working for date with slash. Please help here.

---

<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:** [June 12, 2018, 7:23am UTC](https://discuss.elastic.co/t/ngram-analyze-not-working-for-forward-slash/131866/2 "2018-06-12T07:23:57Z")

</div>

Closed on June 12, 2018, 7:23am UTC

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