installed ES 1.4.3 on an ubuntu box in a three node cluster; cluster is
healthy/green
created a test index and type and added about a million docs to it; my
searches/etc work fine
created file /etc/elasticsearch/scripts/test.groovy and added this very
simple script line (and nothing else) to it: 1 + my_var
believe I have made the test.groovy file accessible to elasticsearch
(made the file owner "elasticsearch" and set access to 666 (rw-rw-rw-)
added this line to my /etc/elasticsearch/elasticsearch.yml file to
enable dynamic scripting (tho thought this wasn't needed for disk based
scripts): script.disable_dynamic: false
tried running this query in marvel sense but just get an error (shown at
bottom of this post):
GET test/_search
{
"script_fields" : {
"my_field" : {
"params" : {
"my_var": 10
},
"script_file":"test"
}
}
}
this dynamic inline query runs fine with no error:
GET moveapi/_search
{
"script_fields": {
"my_field": {
"script": "1 + my_var",
"params": {
"my_var": 2
}
}
}
}
I have tried many variations of the disk based script without success. Can
anyone provide some advice re how to get this to work? I must be missing
some setting or something.
Any help REALLY appreciated. thanks in advance
the error message I get (with "\n" replace with cr/lf to make it readable):
my config files (elasticsearch.yml and logging.yml) are
in /etc/elasticsearch. the script_fields documentation indicated that I
put the test.groovy in "config/scripts" folder, so I assumed my location is
correct as I am unable to find a "config" folder in any elasticsearch folder
I'm having the same problem. Were you able to resolve this? Thanks!
On Thursday, February 26, 2015 at 10:38:26 AM UTC-8, Gerald DeConto wrote:
fyi:
my config files (elasticsearch.yml and logging.yml) are
in /etc/elasticsearch. the script_fields documentation indicated that I
put the test.groovy in "config/scripts" folder, so I assumed my location is
correct as I am unable to find a "config" folder in any elasticsearch folder
On 1:27pm, Mar 31, 2015, at 1:27pm, Julia Neidert neid0021@gmail.com wrote:
I'm having the same problem. Were you able to resolve this? Thanks!
On Thursday, February 26, 2015 at 10:38:26 AM UTC-8, Gerald DeConto
wrote:
fyi:
my config files (elasticsearch.yml and logging.yml) are
in /etc/elasticsearch. the script_fields documentation indicated
that I
put the test.groovy in "config/scripts" folder, so I assumed my
location is
correct as I am unable to find a "config" folder in any elasticsearch
folder
I had the same problem, but I think that the docs are plain wrong, and it
should be script instead of script_file. In any case, if I do that it works
fine.
I had the same problem, but I think that the docs are plain wrong, and
it
should be script instead of script_file. In any case, if I do that it
works
fine.
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.