In version 5.3.1, the way to register the script with the plugin requires the script to be instantiated and it needs a handle to the Node.
Like: @Override
public List getNativeScripts() {
return Arrays.asList(
new LookupScript.Factory(node, this.settings); <=== how to get node?
);
}
How do we get a handle to the current Node in the plugin?
Native scripts are deprecated in 5.x (next release 5.5.0). The documentation has been updated to explain how to create a ScriptEngine to get the same functionality. However, since 5.0, you are not able to do what that example is doing (get a node client). If you want to do that from a script engine (which you should not), you will have to create a client yourself.
Thank you! I need to rework the script to not have to rely on the node client, since we also ran into some deadlock issues when trying to execute a search from the script.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.