Marek
(Marek Karczewski)
November 10, 2017, 7:19pm
1
I try to insert a document with body:
{
"user_uuid":"234",
"description":"",
"category":"art",
"location":{
"lat":52.582014799999996,
"lon":13.4913122
},
"url":"http://172.19.0.4:9000/arbotti/r1RgVuQJMS1xRg4_Xkz "
}
And get the error:
{
"error": {
"root_cause": [
{
"type": "remote_transport_exception",
"reason": "[172.19.0.2][172.19.0.2:9300][indices:data/write/bulk[s][p]]"
}
],
"type": "class_cast_exception",
"reason": "java.lang.Double cannot be cast to java.lang.Float"
},
"status": 500
}
I do not understand why the lat/lon pair is treated as Double.
warkolm
(Mark Walkom)
November 10, 2017, 9:23pm
2
What is the mapping on that field?
Marek
(Marek Karczewski)
November 10, 2017, 9:35pm
3
Mark,
The problem seems gone after I dropped the index and recreated it.
The mapping is geopoint. Seems to work now.
Thank you Mark anyway!
Marek
Marek
(Marek Karczewski)
November 21, 2017, 2:09pm
4
Dear Mark,
Perhaps you can help me. I am using elastic version 5.5.0
I am having a problem with this simple update:
http://localhost:9200/post_elastic/AV_e3-gqARzXw_Stq0-5/_update
{
"script" : {
"inline": "ctx._source.likes += 1",
"lang": "painless"
}
}
This leads to:
{
"error": {
"root_cause": [
{
"type": "remote_transport_exception",
"reason": "[172.19.0.3][172.19.0.3:9300][indices:data/write/update[s]]"
}
],
"type": "illegal_argument_exception",
"reason": "failed to execute script",
"caused_by": {
"type": "script_exception",
"reason": "compile error",
"script_stack": [],
"script": "ctx._source.likes += 1",
"lang": "painless",
"caused_by": {
"type": "runtime_exception",
"reason": "java.lang.ClassNotFoundException: org.elasticsearch.painless.PainlessError"
}
}
},
"status": 400
}
The field to be incremented is an integer.
"likes": {
"type": "integer"
},
Can you please help me to get to the root of the problem?
Thank you.
Best regards,
Marek
warkolm
(Mark Walkom)
November 21, 2017, 6:52pm
5
It'd be better if you started another thread, as that's unrelated to the original question so those that can best assist are unlikely to see the question
Marek
(Marek Karczewski)
November 22, 2017, 9:37pm
6
system
(system)
Closed
December 20, 2017, 9:38pm
7
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.