# Elasticsearch - how to make shorter phrase more relevant in result

**URL:** <https://discuss.elastic.co/t/elasticsearch-how-to-make-shorter-phrase-more-relevant-in-result/195452>\
**Category:** Elasticsearch\
**Created:** [August 16, 2019, 8:04am UTC](https://discuss.elastic.co/t/elasticsearch-how-to-make-shorter-phrase-more-relevant-in-result/195452 "2019-08-16T08:04:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [August 16, 2019, 11:31am UTC](https://discuss.elastic.co/t/elasticsearch-how-to-make-shorter-phrase-more-relevant-in-result/195452/2 "2019-08-16T11:31:56Z")

</div>

[This post](https://discuss.elastic.co/t/ngram-filter-and-relevance-score/22475/2) has a good solution: instead of using the `edge_ngram` filter, use the `edge_ngram` tokenizer:

```auto
  "settings": {
    "index": {
      "refresh_interval": "1m",
      "number_of_shards": "1",
      "number_of_replicas": "1",
      "analysis": {
        "tokenizer": {
          "autocomplete_tokenizer": {
            "type": "edge_ngram",
            "min_gram": "1",
            "max_gram": "20"
          }
        },
        "analyzer": {
          "autocomplete": {
            "filter": [
              "lowercase",
              "asciifolding"
            ],
            "type": "custom",
            "tokenizer": "autocomplete_tokenizer"
          },
          "default": {
            "filter": [
              "lowercase",
              "asciifolding"
            ],
            "type": "custom",
            "tokenizer": "standard"
          }
        }
      }
    }
  }

```

---

_[View the full topic](https://discuss.elastic.co/t/elasticsearch-how-to-make-shorter-phrase-more-relevant-in-result/195452)._
