1
votes

I am trying to use a field for only copying purpose and not to index itself with below mapping

        "Line2": {
            "type":     "text",
            "copy_to": "AllFields" ,
            "enabled": false
        }

But getting exception

{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Mapping definition for [Line2] has unsupported parameters: [enabled : false]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_doc]: Mapping definition for [Line2] has unsupported parameters: [enabled : false]","caused_by":{"type":"mapper_parsing_exception","reason":"Mapping definition for [Line2] has unsupported parameters: [enabled : false]"}},"status":400}

Can this be done ?

ES version : 6.7

1
Change the type from "text" to "object" and try.dassum

1 Answers

2
votes

If you don't want to index (make searchable) a field use "index": false for the field.

"Line2": {
    "type": "text",
    "copy_to": "AllFields",
    "index": false
  }