My organization is preparing to upgrade our Elasticsearch cluster from 2.4.5 to 6.x. After running the Migration Helper and enabling deprecation logging, the deprecation log on one of our client nodes began to fill up with the same message over and over - hundreds of them a minute. Here is a very brief excerpt:
[2018-01-10 21:45:52,936][DEBUG][deprecation.script ] this form of the script api is deprecated and will be removed from the java api in the next major version. See scripting section of the documentation for the new syntax
[2018-01-10 21:45:53,052][DEBUG][deprecation.script ] this form of the script api is deprecated and will be removed from the java api in the next major version. See scripting section of the documentation for the new syntax
[2018-01-10 21:45:53,975][DEBUG][deprecation.script ] this form of the script api is deprecated and will be removed from the java api in the next major version. See scripting section of the documentation for the new syntax
[2018-01-10 21:45:53,975][DEBUG][deprecation.script ] this form of the script api is deprecated and will be removed from the java api in the next major version. See scripting section of the documentation for the new syntax
[2018-01-10 21:45:53,975][DEBUG][deprecation.script ] this form of the script api is deprecated and will be removed from the java api in the next major version. See scripting section of the documentation for the new syntax
Am I missing something here? I would like to know what specifically is deprecated, but these log messages are too vague to interpret. The rapid fire repeated nature of the messages is also a concern.
Is there anything I can do that will help me to find the source of these log messages?
the syntax how you specify a script has change and you seem to use the old way of doing it. Can you show how you specify scripts in your requests so I can show you what the problem is?
Thank you for your response, Simon. It looks like we have a bunch of locations where we've been specifying scripts like this:
UpdateDesciptor.Update<ItemSearchable>(
u => u
.Id(itemId)
.ScriptFile(scriptFile)
);
But as part of our updates, we have changed that to use a script descriptor, like this:
var scriptParams = new Dictionary<string, object>() { { "newGeoShapeJson", newGeoJson } };
var script = new Nest.ScriptDescriptor().Source("AddOrReplaceGeometry");
oh I see, you are using NEST. I am not 100% sure how NEST handles compatibility but I think I recall that you have to upgrade your nest client to the same version of elasticsearch. In that case nest should use the right syntax. I think @Martijn_Laarman should be able to help here with a definitive answer
@s1monw is correct NEST compatibility is tied to Elasticsearch's major version. Meaning for Elasticsearch 6.x you will need to use NEST 6.x.
With 6.x you will need to either specify and inline script using Source() or refer to an indexed script using Id(), support for file based scripts has been removed, so AddOrReplaceGeometry needs to be indexed into elasticsearch and refered to by using Id("AddOrReplaceGeometry")
client.PutScript("AddOrReplaceGeometry", r => r
.Painless("...")
);
client.Update<Person>("person-id", r => r
.Script(s=>s
.Id("AddOrReplaceGeometry")
.Params(p=>p
.Add("x", "y")
)
)
);
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.