Hi, I'm using script below to remove multiple fields from elasticsearch:
"script" : "ctx._source.remove('new_field1'); ctx._source.remove('new_field2')"
When there are many fields that should be removed, this exception happens:
compile error
illegal_argument_exception
Scripts may be no longer than 16384 characters.
So how can I remove many fields by scripting, without script length overflow?
I never did that. So I don't know. You can in worse case send a param like "1,2,3,4" then split the string in the script on comma and for each Id do whatever you need.
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.