Advanced JSON Input Script doesnt work

When I try to run this script it tells me 5 shards of 240 failed.

{
  "script": {
"inline": "float u_x = Math.abs(doc['x'].value-doc['x'].value)-doc['x'].value;float u_y = Math.abs(doc['y'].value-doc['y'].value)-doc['y'].value;float v_x = Math.abs(doc['x'].value-doc['x'].value)-doc['x'].value;float v_y = Math.abs(doc['y'].value-doc['y'].value)-doc['y'].value;return (180/3.14159265359)*Math.acos((u_x*v_x+u_y*v_y)/(Math.sqrt(u_x*u_x+u_y*u_y)*Math.sqrt(v_x*v_x+v_y*v_y)));",
"lang": "painless"
  }
}

This is just a wild guess, as you haven't provided any further exception message, but I suppose that 5 shards have a different (or no) mapping for one of the fields used in that script, i.e. a string instead of a number.

--Alex

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