Elasticsearch 7.0, unknown setting [index.mapping.single_type]

I installed ES 7.0 recently, but I find that it's different from old versions. I tried official tutorials, but failed, I don't know why.

This is official tutorial link:
https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html#

This is my code:
PUT test
{
"settings": {
"analysis": {
"filter": {
"synonym_filter":{
"type":"synonym",
"synonyms_path":"yxws_synonyms.txt",
"ignore_case":"True"
}
}
}
,"similarity":{
"qa_bm25":{
"type":"BM25",
"b":"0.75",
"k1":"1.2"
}
},
"index.mapping.single_type": true
}
, "mappings": {
"qa":{
"properties":{
"id":{"type":"integer"},
"department":{"type":"text"},
"disease":{"type":"text"},
"question":{"type":"text","similarity":"qa_bm25"},
"wordsDict":{"type":"text"},
"answer":{"type":"text"}
}
}
}
}

This is errors:

{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "unknown setting [index.mapping.single_type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
}
],
"type": "illegal_argument_exception",
"reason": "unknown setting [index.mapping.single_type] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
},
"status": 400
}

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.

Here remove

"index.mapping.single_type": true

And the type name

"qa":{
1 Like

Okay! I'm sorry because I'm a newer, I will pay more attention to my post format. I have debugged it just now, thank you all the same sincerely:-)

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