Painless API Referenceedit

Painless has a strict whitelist for methods and classes to ensure all painless scripts are secure. Most of these methods are exposed directly from the Java Runtime Enviroment (JRE) while others are part of Elasticsearch or Painless itself. Below is a list of all available classes grouped with their respected methods. Clicking on the method name takes you to the documentation for that specific method. Methods defined in the JRE also have a (java 9) link which can be used to see the method’s documentation in Java 9.

AbstractChronology
AbstractCollection
AbstractList
AbstractMap
AbstractMap.SimpleEntry
AbstractMap.SimpleImmutableEntry
AbstractQueue
AbstractSequentialList
AbstractSet
Annotation
Appendable
ArithmeticException
ArrayIndexOutOfBoundsException
ArrayList
ArrayStoreException
Arrays
Base64.Decoder
Base64.Encoder
BiConsumer
BiFunction
BiPredicate
Bidi
BigDecimal
BigInteger
BinaryOperator
BitSet
Boolean
BooleanSupplier
Byte
BytesRef
Calendar
Character
Character.Subset
  • Inherits methods from Object
Character.UnicodeBlock
Character.UnicodeScript
CharacterIterator
ChoiceFormat
ChronoField
ClassCastException
ClassNotFoundException
Clock
CloneNotSupportedException
CollationElementIterator
CollationKey
Collator
Collection
Collections
Collectors
Comparable
ConcurrentModificationException
Consumer
Date
DateFormat
DateTimeException
DateTimeFormatter
DateTimeFormatterBuilder
DateTimeParseException
Debug
Deque
Dictionary
Double
DoubleBinaryOperator
DoubleConsumer
DoubleFunction
DoublePredicate
DoubleStream
DoubleStream.Builder
DoubleSummaryStatistics
DoubleSupplier
DoubleToIntFunction
DoubleToLongFunction
DuplicateFormatFlagsException
Duration
EmptyStackException
Enum
EnumConstantNotPresentException
Enumeration
EventListener
  • Inherits methods from Object
EventListenerProxy
EventObject
FieldPosition
Float
Format.Field
  • Inherits methods from Object
FormatFlagsConversionMismatchException
FormatStyle
Formattable
FormattableFlags
Formatter.BigDecimalLayoutForm
FormatterClosedException
Function
GregorianCalendar
HashMap
HashSet
Hashtable
HijrahEra
IdentityHashMap
IllegalAccessException
IllegalArgumentException
IllegalFormatCodePointException
IllegalFormatConversionException
IllegalFormatException
IllegalFormatFlagsException
IllegalFormatPrecisionException
IllegalFormatWidthException
IllegalMonitorStateException
IllegalStateException
IllegalThreadStateException
IndexOutOfBoundsException
InputMismatchException
InstantiationException
IntBinaryOperator
IntConsumer
IntFunction
IntPredicate
IntStream
IntStream.Builder
IntSummaryStatistics
IntSupplier
IntToDoubleFunction
IntToLongFunction
Integer
InterruptedException
IsoEra
Iterator
JapaneseEra
JulianFields
LinkedHashMap
LinkedHashSet
LinkedList
List
ListIterator
LocalDate
LocalDateTime
LocalTime
Locale
Locale.Category
Locale.LanguageRange
Long
LongBinaryOperator
LongConsumer
LongFunction
LongPredicate
LongStream
LongStream.Builder
LongSummaryStatistics
LongSupplier
LongToDoubleFunction
LongToIntFunction
Map
Math
MessageFormat.Field
MinguoEra
MissingFormatArgumentException
MissingFormatWidthException
MissingResourceException
Month
NavigableSet
NegativeArraySizeException
NoSuchElementException
NoSuchFieldException
NoSuchMethodException
Normalizer
Normalizer.Form
NullPointerException
Number
NumberFormatException
ObjDoubleConsumer
ObjIntConsumer
ObjLongConsumer
Object
Objects
Observable
Observer
OffsetDateTime
OffsetTime
Optional
OptionalDouble
OptionalInt
OptionalLong
ParseException
ParsePosition
Predicate
PrimitiveIterator
PrimitiveIterator.OfDouble
PrimitiveIterator.OfInt
PrimitiveIterator.OfLong
PriorityQueue
Queue
Random
RandomAccess
  • Inherits methods from Object
ReflectiveOperationException
ResolverStyle
RuntimeException
SecurityException
Set
Short
SignStyle
SimpleTimeZone
SortedMap
SortedSet
Spliterator
Spliterator.OfDouble
Spliterator.OfInt
Spliterator.OfLong
Spliterator.OfPrimitive
Stack
Stream.Builder
StrictMath
String
StringCharacterIterator
StringIndexOutOfBoundsException
Supplier
System
TemporalAdjuster
TemporalAmount
TemporalQueries
TemporalQuery
TemporalUnit
TimeZone
ToDoubleBiFunction
ToDoubleFunction
ToIntBiFunction
ToIntFunction
ToLongBiFunction
ToLongFunction
TooManyListenersException
TreeMap
TreeSet
TypeNotPresentException
UUID
UnaryOperator
UnknownFormatConversionException
UnknownFormatFlagsException
UnsupportedOperationException
UnsupportedTemporalTypeException
ValueRange
Vector
ZoneOffset
ZoneRulesException
ZoneRulesProvider
ZonedDateTime
org.elasticsearch.common.geo.GeoPoint
org.elasticsearch.index.fielddata.ScriptDocValues.Booleans
org.elasticsearch.index.fielddata.ScriptDocValues.BytesRefs
org.elasticsearch.index.fielddata.ScriptDocValues.Dates
org.elasticsearch.index.fielddata.ScriptDocValues.Doubles
org.elasticsearch.index.fielddata.ScriptDocValues.GeoPoints
org.elasticsearch.index.fielddata.ScriptDocValues.Longs
org.elasticsearch.index.fielddata.ScriptDocValues.Strings
org.elasticsearch.index.mapper.IpFieldMapper.IpFieldType.IpScriptDocValues
org.elasticsearch.index.similarity.ScriptedSimilarity.Doc
org.elasticsearch.index.similarity.ScriptedSimilarity.Field
org.elasticsearch.index.similarity.ScriptedSimilarity.Query
org.elasticsearch.index.similarity.ScriptedSimilarity.Term
org.elasticsearch.painless.FeatureTest
org.elasticsearch.search.lookup.FieldLookup
org.joda.time.ReadableInstant