elasticsearch - Cannot load search template registered with REST API -


i have problem when loading search template has been registrered through rest api. if search template placed in /config/scrips/ folder there no problem.

the template has been registrered via post to: /_search/template/templatename, , can see template has been succesfully registered when to: /_search/template/templatename.

however, when try send request utilizes search template error. if have tried following endpoints:

post: /_search/template (the 1 documentation)

post: [index]/_search/template

post: [index]/[type]/_search/template

with body:

{ "template": { "file": "templatename" }, "params": { "userid" : "au43nsotzoszwq_2zua4", etc... } } 

but keeps returning error:

{ "error": "searchphaseexecutionexception[failed execute phase [query_fetch], shards failed; shardfailures {[udbajwkqq5gpzedzlctrfg][.scripts][0]: elasticsearchillegalargumentexception[unable find on disk script templatename]}]", "status": 400 } 

i cannot upload files elasticsearch host i'm using, need register them via post request. missing?

thanks in advance

the correct search request this:

get /some_index/_search/template {   "template": {     "id":"templatename"   },   "params": {     "userid" : "au43nsotzoszwq_2zua4",     ...   } } 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -