0

I try to access to an instance of "org.elasticsearch.client.Client" in a mvel script into elasticsearch. I try to call directly "client", and i have this error :

[Error: unresolvable property or identifier: client]

Apparently is not the good way but i don't see anywhere the good way. But this client exist during the execution of the mvel script, so where can i get it?

YLR
  • 1,503
  • 4
  • 21
  • 28
  • It could be important but the mvel script is stored in file and i call it during query search (but i have potentialy the same trouble during an index phase) – YLR Aug 27 '13 at 14:17

1 Answers1

0

The client object is not available in the context of script execution.

javanna
  • 59,145
  • 14
  • 144
  • 125
  • Ok, that why! I actually try to create a transportclient, i think is the best way to have a client in the script. – YLR Aug 27 '13 at 15:55
  • Now you made me curious about what you would like to do in a script with a client...and where are you placing that script exactly? Can you elaborate a bit more, maybe updating your question? – javanna Aug 27 '13 at 20:20
  • It's a little particular, the goal is to make some calcul during indexation phase and to store the result of this operation in other index in elasticsearch. A bit complex apparently, but it could be work. I don't think an update is efficient, I make a new thread if necessary. – YLR Aug 28 '13 at 08:46