How to change index.max_shingle_diff?

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!!!

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

Does

PUT test

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

GET test/_settings

work as expected?

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!!!

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!

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