http://lotteriahanoi.000webhostapp.com/

http://lotteriahanoi.000webhostapp.com/

HACKED BY BACTRAN FROM VIETNAM
View Answers

November 18, 2019 at 11:42 PM

The elasticsearch painless script is essentially a groovy script which is compiled and run on JVM level.

You can write Java code in groovy painless script.

The trim() method of String class is used for trimming the data. Here is simple example:

POST /testing_index/doc/_update_by_query
{
  "script": {
    "lang": "painless",
    "source": """

    ctx._source.first_name = ctx._source.first_name.trim();
    """
  }
}

Thanks









Related Tutorials/Questions & Answers:

Ads