# Edgengram

**URL:** <https://discuss.elastic.co/t/edgengram/175769>\
**Category:** Elasticsearch\
**Created:** [April 8, 2019, 6:49am UTC](https://discuss.elastic.co/t/edgengram/175769 "2019-04-08T06:49:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucian\_Criste](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lucian_criste/32/43628_2.png) [@Lucian\_Criste](https://discuss.elastic.co/u/Lucian_Criste)\
**Post date:** [April 8, 2019, 6:49am UTC](https://discuss.elastic.co/t/edgengram/175769/1 "2019-04-08T06:49:56Z")

</div>

i have this query

```
GET product_de/_search
{
              "from" : "0","size":"5",
                  "query": {
                      "match": {
                        "product_title.edgengram": "34151001 "
                      }
                    }
                 }

```

I always get first products with title that contains 34151003 .. 34151003 and then 34151001 in title.

also

````auto
POST product_de/_analyze
{
  "tokenizer": "edge_ngram_tokenizer",
  "text": "34151001"
}```

{
  "tokens": [
    {
      "token": "341",
      "start_offset": 0,
      "end_offset": 3,
      "type": "word",
      "position": 0
    },
    {
      "token": "3415",
      "start_offset": 0,
      "end_offset": 4,
      "type": "word",
      "position": 1
    },
    {
      "token": "34151",
      "start_offset": 0,
      "end_offset": 5,
      "type": "word",
      "position": 2
    },
    {
      "token": "341510",
      "start_offset": 0,
      "end_offset": 6,
      "type": "word",
      "position": 3
    },
    {
      "token": "3415100",
      "start_offset": 0,
      "end_offset": 7,
      "type": "word",
      "position": 4
    },
    {
      "token": "34151001",
      "start_offset": 0,
      "end_offset": 8,
      "type": "word",
      "position": 5
    }
  ]
}
````

---

<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:** [May 6, 2019, 6:50am UTC](https://discuss.elastic.co/t/edgengram/175769/2 "2019-05-06T06:50:01Z")

</div>

Closed on May 6, 2019, 6:50am UTC

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