I'm novice in ES. I've read about scripts (painless) and want to use it as stored procedures in a RDBMS. It's possible, right? I want
receive some docs by call my script (it should does some selection)
It's important. Process all docs and to build value some fields in every doc.
I was try to make scrip for receive string message as example. But I receive error "can't cast String to boolean" only. When I've create script by example - I receive same error:
"caused_by": {
"type": "class_cast_exception",
"reason": "java.lang.Double cannot be cast to java.lang.Boolean"
}
What I do wrong? Help, please!
Writing scripts can be painful (regardless it is called "painless"). Can you please post here what is the query with script that you are using so we can review it?
Also, if you can, provide a sample document that this script should work with.
Which documentation page do you see that example on? Your search request is using a filter script, which must return a boolean value (true if the current document should match the query, false otherwise). But the stored script you are using looks like a scoring script, meant to be used within a function score query.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.