Script file support in the Nest library for Elasticsearch

I am using NEST v1.4.3 with Elasticsearch v1.5 and cannot find anything in the ScriptFilterDescriptor that will translate the script_file to Elasticsearch.

Is there support for using scripts saved on disk with the Elasticsearch NEST library?

+3


source to share


1 answer


In your script_file, you reference the "file" parameter in your script request below: -

GET /_search
{
  "query":{
    "filtered":{
      "filter":{
        "script":{
          "file":"your_custom_script",
          "lang":"groovy",
          "params":{
            "shift":3
          }
        }
      }
    }
  }
}

      



I have the same problem when I try to use NEST to read from a script file written to disk.

This was added recently: https://github.com/elastic/elasticsearch-net/issues/1456

0


source







All Articles