Are Groovy methods available in Painless


(dob) #1

HI

I'm trying to use Groovy string methods, such as replaceAll(); in painless, but keep getting compile errors.

Heres my script:

String a = doc[Industry.keyword].value;
String t = a.replaceAll(","," ");
return t

I'm trying to remove all commas from the field. Are all groovy string methods supported for painless?


(Matt Bargar) #2

Painless mainly exposes core Java APIs. You can read the full API reference here.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.