I just realized that I forgot to copy some scripts to all nodes, but when running a query over all documents in the index (--> so all nodes get to work) no error is shown and it does not crash.
This can also be interpreted that the scripts need to be save in any of the nodes to be usable, not on all.
I wonder what actually is happening, the scripts are to multiply _score with some function inside function_score, so I am curious to know whether it is rescoring all docs or not.
I also checked that when calling an unexisting script (on all nodes) instead it actually does crash...
So in resumee the post boils down to 2 question:
1)Do the scripts have to be on all nodes?
2) If yes, why did I not get any error?
The scripts should be on all nodes. Do you have a default configuration for your index (5 shards, 1 replica)? How many nodes? The script will be run on 1 shard each, so only 5 nodes. If you had say 10 nodes with that setup (1 shard on every node), there would be 5 nodes in your request the script would not be run on. But doing further requests could select different copies of the shards, thus why the scripts should be on all nodes.
Lol sorry I need the proper nomenclature and also just write a bit more clearly.
Atm ES runs on 3 nodes (=3 instances of bin/elasticsearch running). The 6 refers to the shards, i.e. in the /config/elasticsearch.yml there is this this setting:
"number_of_shards": 6,
"number_of_replicas": 1,
With crashing I mean a 4xx reply which I never got, it just executed my query and returned scores (which I assumed to have been rescored in the scripts).
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.