http://lotteriahanoi.000webhostapp.com/

Ads
 

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

Ads









Related Tutorials/Questions & Answers:

Ads