Root mapping definition has unsupported parameters

Shreyas Rao B picture Shreyas Rao B · May 30, 2016 · Viewed 7.5k times · Source

I am getting error whenever i tried to give the below mappings.

Is there anything you need to do for "copy_to".

PUT myindex/mytype/_mapping
{
  "mappings": {
  "properties": {
  "manufacturer": {
    "type": "string",
    "copy_to": "full_make_model_name"
  },
  "name": {
    "type": "string",
    "copy_to": "full_make_model_name"
  },
  "full_make_model_name": {
    "type": "string",
    "index": "analyzed"
  }
 }
}
}

Answer

alpert picture alpert · May 30, 2016

Try:

PUT myindex/_mapping/mytype
{
  "properties": {
  "manufacturer": {
    "type": "string",
    "copy_to": "full_make_model_name"
  },
  "name": {
    "type": "string",
    "copy_to": "full_make_model_name"
  },
  "full_make_model_name": {
    "type": "string",
    "index": "analyzed"
  }
 }
}

https://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-put-mapping.html#indices-put-mapping