title: Elasticsearch not allowing brackets for fields name for scripting
body: <p>I've tried to use update api. I've inserted a document which contains a list.</p>
  
  <p>INSERT:</p>
  
  <pre><code>curl -XPOST "http://localhost:9200/t/t/1" -d' 
  { 
  "hobbies(first)" : ["a", "b"] 
  }' 
  </code></pre>
  
  <p>UPDATE QUERY:</p>
  
  <pre><code>curl -XPOST localhost:9200/t/t/1/_update?pretty -d '{   "script" : {
         "inline": "ctx._source.hobbies(first).add(params.new_hobby)",
         "params" : {
            "new_hobby" : "c"
         }
     }
  }'
  </code></pre>
  
  <p>ERROR:</p>
  
  <pre><code>{
    "error" : {
      "root_cause" : [
        {
          "type" : "remote_transport_exception",
          "reason" : "[aaBiwwv][172.17.0.2:9300][indices:data/write/update[s]]"
        }
      ],
      "type" : "illegal_argument_exception",
      "reason" : "failed to execute script",
      "caused_by" : {
        "type" : "script_exception",
        "reason" : "compile error",
        "caused_by" : {
          "type" : "illegal_argument_exception",
          "reason" : "Variable [first] is not defined."
        },
        "script_stack" : [
          "ctx._source.hobbies(first).add(params.new_hob ...",
          "                    ^---- HERE"
        ],
        "script" : "ctx._source.hobbies(first).add(params.new_hobby)",
        "lang" : "painless"
      }
    },
    "status" : 400
  }
  </code></pre>
  
  <p>When I've tried to update list, I've got error above. I've realized that when I removed part with brackets(<strong>'(first)'</strong>)  from my field's name, it's working. How can I prepare an update query with a field name with brackets? </p>
  
  <p>Thanks in advance.</p>