0

My ES version is 6.0.0.

I am trying to generate a random UUID via an update by query script. Painless simply is refusing to cooperate.

Taken from their official docs: https://www.elastic.co/guide/en/elasticsearch/painless/6.0/painless-api-reference.html

UUID
static UUID fromString(String) (java 9)

My script:

def randText = UUID.fromString("asdadsad");

I get errors

    "caused_by": {
      "type": "illegal_argument_exception",
      "reason": "Unknown call [fromString] with [0] arguments on type [UUID]."
    }

I tried every combination possible

new UUID()
new UUID
UUID.random()
UUID.randomString()
UUID.randomUuid()
UUID.randomUUID()

How is this class supposed to work?

PS: Painless is the most painful language I've worked with.

etudor
  • 1,183
  • 1
  • 11
  • 19

0 Answers0