# Edge ngram for numeric value

**URL:** https://discuss.elastic.co/t/edge-ngram-for-numeric-value/273793
**Category:** Elasticsearch
**Created:** [May 24, 2021, 8:28am UTC](https://discuss.elastic.co/t/edge-ngram-for-numeric-value/273793 "2021-05-24T08:28:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![vikramdayma](https://avatars.discourse-cdn.com/v4/letter/v/a698b9/32.png) [@vikramdayma](https://discuss.elastic.co/u/vikramdayma)
#### Post date: [May 24, 2021, 8:28am UTC](https://discuss.elastic.co/t/edge-ngram-for-numeric-value/273793/1 "2021-05-24T08:28:52Z")

</div>

Hi,

I am implementing edge ngram on a text field for letters and digits. But it is not able to search numeric value.

My code is:

```auto
PUT my-index-00001
{
  "settings": {
    "analysis": {
      "analyzer": {
        "autocomplete": {
          "tokenizer": "autocomplete",
          "filter": [
            "lowercase"
          ]
        },
        "autocomplete_search": {
          "tokenizer": "lowercase"
        }
      },
      "tokenizer": {
        "autocomplete": {
          "type": "edge_ngram",
          "min_gram": 2,
          "max_gram": 10,
          "token_chars": [
            "letter",
            "digit"
          ]
        }
      }
    }
  },
  "mappings": {
    "properties": {
      "title": {
        "type": "text",
        "analyzer": "autocomplete",
        "search_analyzer": "autocomplete_search"
      }
    }
  }
}

```

I inserted this value:

```auto
PUT my-index-00001/_doc/1
{
  "title": "realtors 545768 hello" 
}

```

And I am searching by numeric value:

```auto
GET my-index-00001/_search
{
  "query": {
    "match": {
      "title": "54"
    }
  }
}

```

But no result.

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: [June 21, 2021, 8:29am UTC](https://discuss.elastic.co/t/edge-ngram-for-numeric-value/273793/2 "2021-06-21T08:29:18Z")

</div>

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