Are there reserved fields in a document?

I used the field naming to 'ownerid'. Strictly 'ownerid', not 'ownerId', 'ownerId', 'OwnerID' things..
These are processed well. But only 'ownerid' is not working when I map first time. I never had defined 'ownerid'. NEVER!
Here is example.

http://127.0.0.1:9200/example_index/_mapping/example_type
{
  "properties": {
    "ownerid": {
      "type": "long"
    }
  }
}
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "mapper [ownerid] cannot be changed from type [int] to [long]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "mapper [ownerid] cannot be changed from type [int] to [long]"
  },
  "status": 400
}

So I guessed It's reserved thing. but I can't know where exist. And no guides, issues...

Anybody has same issue? or please reproduce this issue and check out.

oh. elasticsearch version is 2.4.1. this is important. :slight_smile:

Thanks!

what's in the mappings for the index? You can run

curl -XGET "http://localhost:9200/example_index/_mapping/example_type"

The error indicates that you already have a field called ownerid that is mapped as int. You may not have explicitly mapped this; if you have dynamic mapping enabled then Elasticsearch would have dynamically mapped this field from an indexed document, inferring the type from the field value.

curl -XGET "http://localhost:9200/example_index/_mapping/example_type"

result is NOTHING. just 200 OK {}. I notified the opinion which that was the first mapping.

So I issued at elasticsearch github. But it's closed immediately with same reason you thought. :slight_smile:

Did you try to reproducing that issue? Thanks for reply.

I just ran that test which works well with 2.4.1:

DELETE test
PUT test
PUT test/_mapping/type
{
  "properties": {
    "ownerid": {
      "type": "long"
    }
  }
}

It gives:

{
  "acknowledged": true
}

@dadoonet I checked that your test from first app install repeatedly. First, I'm so sorry. The cause of my issue was fail of restoring snapshot. I once did fail restoring of snapshot. So I guess that issue occured since garbage thing. I reinstalled app and mapped, It worked well. Thanks for your patient about such a idiot question. I'm really sorry.

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