5

I have installed Elasticsearch 5.1 in ubuntu 14.04. I have performed some operations in Elasticsearch like create index, delete index etc. Then I have installed Kibana 5.1. Now I want to create new index in elasticsearch using postman (localhost:9200/my_index with PUT). But I'm getting this error.

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "unknown setting [index.country] 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.country] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"
  },
  "status": 400
}

I remember that I have used country as index or type. But then I have purged elasticsearch and kibana (also deleted directories related to those). Reinstalled both. But still getting this error. If anyone knows the solution, it will be appreciated.

Here is output of some query which may you need to solve issue.

GET localhost:9200/_mapping

{ ".kibana": { "mappings": { "server": { "properties": { "uuid": { "type": "keyword" } } }, "config": { "properties": { "buildNum": { "type": "keyword" } } } } } }

(GET) localhost:9200/_cat/indices?v

[ { "health": "yellow", "status": "open", "index": ".kibana", "uuid": "O_ORG0ONQNCEe8JU_C0SKQ", "pri": "1", "rep": "1", "docs.count": "1", "docs.deleted": "0", "store.size": "3.1kb", "pri.store.size": "3.1kb" } ]

(GET) localhost:9200/country

{ "error": { "root_cause": [ { "type": "index_not_found_exception", "reason": "no such index", "resource.type": "index_or_alias", "resource.id": "country", "index_uuid": "na", "index": "country" } ], "type": "index_not_found_exception", "reason": "no such index", "resource.type": "index_or_alias", "resource.id": "country", "index_uuid": "na", "index": "country" }, "status": 404 }

2
  • Are you sending a requestbody with the put request for index creation? Commented Dec 14, 2016 at 8:37
  • How're you doin the post, if you could show us ? Commented Dec 14, 2016 at 8:40

2 Answers 2

5

You can simply have a PUT request as such:

http://localhost:9200/indexname <--- give your index name

And then within your request body you could give the mappings:

{
  "mappings": {
    "message_logs": {
      "properties": {
        "anyfield": { <-- give your field
          "type": "text" <-- and the type
        }
      }
    }
  }
}

This SO might help you if you're willing to create the index using CURL. The above is just a sample. You could reproduce it.

Sign up to request clarification or add additional context in comments.

Comments

0

I have experienced the same problem. My problem is to put code into the "Body" area, just detele that, the GET function would work.

Same error message: { "error": { "root_cause": [ { "type": "illegal_argument_exception", "reason": "request [GET /person/_doc/1] does not support having a body" } ], "type": "illegal_argument_exception", "reason": "request [GET /person/_doc/1] does not support having a body" }, "status": 400 }

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.