I add this code in my shell script. But every time I add single quotation in painless( 'hello' )
It keeps giving me errors. I don't know what is wrong with my code. I hope you will be able to help with this. Thank you in advance.
this is more of a shell escaping question rather than an elasticsearch question.
As you havent mentioned your shell, the most important part is to read about escaping roles for your shell. Sometimes it is as easy as prepending the tick with a backslash, like \' when doing the quotation. You could also use double tickes and escape them properly, so that those are JSON escaped when being sent to Elasticsearch.
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.