# How to change index.max\_shingle\_diff?

**URL:** <https://discuss.elastic.co/t/how-to-change-index-max-shingle-diff/220421>\
**Category:** Elasticsearch\
**Created:** [February 21, 2020, 5:01pm UTC](https://discuss.elastic.co/t/how-to-change-index-max-shingle-diff/220421 "2020-02-21T17:01:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cgsoratto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cgsoratto/32/63119_2.png) [@cgsoratto](https://discuss.elastic.co/u/cgsoratto)\
**Post date:** [February 21, 2020, 5:01pm UTC](https://discuss.elastic.co/t/how-to-change-index-max-shingle-diff/220421/1 "2020-02-21T17:01:25Z")

</div>

Hi!

I installed ES 7.6.0 but I have the error:

"In Shingle TokenFilter the difference between max\_shingle\_size and min\_shingle\_size (and +1 if outputting unigrams) must be less than or equal to: [3] but was [9]. This limit can be set by changing the [index.max\_shingle\_diff] index level setting."

I tried to use postman to change this setting, but I can't.

PUT localhost:9200/\_all/\_settings

```
{
    "index" : {
        "max_shingle_diff" : 10
    }
}

```

Returns:

```
{
    "error": {
        "root_cause": [
            {
                "type": "index_not_found_exception",
                "reason": "no such index [null] and no indices exist",
                "resource.type": "index_expression",
                "resource.id": "_all"
            }
        ],
        "type": "index_not_found_exception",
        "reason": "no such index [null] and no indices exist",
        "resource.type": "index_expression",
        "resource.id": "_all"
    },
    "status": 404
}

```

Can someone help me?  
Thanks!!!

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 24, 2020, 9:40am UTC](https://discuss.elastic.co/t/how-to-change-index-max-shingle-diff/220421/2 "2020-02-24T09:40:13Z")

</div>

Do you have any indices in that cluster or is it possible that this cluster does not contain any data?

Does

```auto
PUT test

PUT _all/_settings
{
    "index" : {
        "max_shingle_diff" : 10
    }
}

GET test/_settings

```

work as expected?

---

<div class="post-metadata">

**Author:** ![cgsoratto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cgsoratto/32/63119_2.png) [@cgsoratto](https://discuss.elastic.co/u/cgsoratto)\
**Post date:** [February 24, 2020, 10:24am UTC](https://discuss.elastic.co/t/how-to-change-index-max-shingle-diff/220421/3 "2020-02-24T10:24:06Z")

</div>

Ok, I created a new cluster. But, still the same error.

New cluster:

```
   "test": {
        "settings": {
            "index": {
                "number_of_shards": "1",
                "provided_name": "test",
                "max_shingle_diff": "3",
                "creation_date": "1582538351112",
                "number_of_replicas": "1",
                "uuid": "h2RqXF3tTIGYJxg8FAGReA",
                "version": {
                    "created": "7060099"
                }
            }
        }
    }

```

GET localhost:9200/

```
{
  "name": "carlos",
  "cluster_name": "elasticsearch",
  "cluster_uuid": "mDgBWq1BRcGE9iF-gmh7Jg",
  "version": {
    "number": "7.6.0",
    "build_flavor": "default",
    "build_type": "deb",
    "build_hash": "7f634e9f44834fbc12724506cc1da681b0c3b1e3",
    "build_date": "2020-02-06T00:09:00.449973Z",
    "build_snapshot": false,
    "lucene_version": "8.4.0",
    "minimum_wire_compatibility_version": "6.8.0",
    "minimum_index_compatibility_version": "6.0.0-beta1"
  },
  "tagline": "You Know, for Search"
}

```

How to change the cluster\_uuid?

Thanks!!!

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [February 24, 2020, 10:53am UTC](https://discuss.elastic.co/t/how-to-change-index-max-shingle-diff/220421/4 "2020-02-24T10:53:20Z")

</div>

so you get the same error, but the setting is set after this in your index? Can you add `error_trace=true` and post the response here on that settings call?

Thx!

---

<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:** [March 23, 2020, 10:53am UTC](https://discuss.elastic.co/t/how-to-change-index-max-shingle-diff/220421/5 "2020-03-23T10:53:23Z")

</div>

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