Hi, I've a stored script :
POST _scripts/1_jd_job_domain
{
"script": {
"lang": "painless",
"params": {
"generic_domain": "generic domain"
[...]
},
"source" : """if ( ctx._source.car?.current_assignment?.job_description?.jdl1_id_reports_to != null && ctx._source.car?.current_assignment?.job_description?.jdl3_id_reports_to != null)
{ Map map_generic_details = new HashMap()
; ArrayList list_domain_list = new ArrayList()
; map_generic_details.put('index type' , params.generic_domain)
;map_generic_details.put('value',params.generic_plus_specific_plus_intermediate)
[...]
I call this script from logstash output plugin. It works fine for the rest except it doesn't retrieve the values from the params. What am I doing wrong ?
I've also tried defining those params in the logstsh output part like this :
parameters => {"generic_domain" => "generic_domain"}
but then I've the error:
Response code '400' contacting Elasticsearch at URL 'http://localhost:9200/?generic_domain=generic_domain'"}
What am I doing wrong? I would prefer a solution where I could get the parameters values from the stored script if possible. Thank you