script filter (not dynamic)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

script filter (not dynamic)

Guillermo Arias del Río
Hi, how can I specify a not dynamic script as a filter? The documentation shows how to specify a dynamic one:

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-script-filter.html#query-dsl-script-filter

I would like to call a stored script, like in the example with the "calculate-score" function in:

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/36585348-ba0e-4278-9b20-4c15906a8ef8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: script filter (not dynamic)

dadoonet
Did you try this?

"filter" : {
       
"script" : {
           
"script" : "calculate-score"
       
}
   
}


-- 
David Pilato | Technical Advocate | Elasticsearch.com


Le 4 juillet 2014 à 10:43:08, Guillermo Arias del Río ([hidden email]) a écrit:

Hi, how can I specify a not dynamic script as a filter? The documentation shows how to specify a dynamic one:

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-script-filter.html#query-dsl-script-filter

I would like to call a stored script, like in the example with the "calculate-score" function in:

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/36585348-ba0e-4278-9b20-4c15906a8ef8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.53b66bf4.515f007c.2fae%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: script filter (not dynamic)

Guillermo Arias del Río
Oops, my script was not in the right place and was not found. I thought, ES was trying to evaluate the expression "<script-name>" and I had to tell it that it was a script. Thanks.

El viernes, 4 de julio de 2014 10:55:30 UTC+2, David Pilato escribió:
Did you try this?

"filter" : {
       
"script" : {
           
"script" : "calculate-score"
       
}
   
}


-- 
David Pilato | Technical Advocate | Elasticsearch.com
<a href="https://twitter.com/dadoonet" style="color:rgb(17,85,204)" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Ftwitter.com%2Fdadoonet\46sa\75D\46sntz\0751\46usg\75AFQjCNE-DMC3YEu3X_lhRIhUzuSZGsaSqA';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Ftwitter.com%2Fdadoonet\46sa\75D\46sntz\0751\46usg\75AFQjCNE-DMC3YEu3X_lhRIhUzuSZGsaSqA';return true;">@dadoonet | <a href="https://twitter.com/elasticsearchfr" style="color:rgb(17,85,204)" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Ftwitter.com%2Felasticsearchfr\46sa\75D\46sntz\0751\46usg\75AFQjCNGfXdQ98RWFMJXdiqpKnZb5GMg0zA';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Ftwitter.com%2Felasticsearchfr\46sa\75D\46sntz\0751\46usg\75AFQjCNGfXdQ98RWFMJXdiqpKnZb5GMg0zA';return true;">@elasticsearchfr


Le 4 juillet 2014 à 10:43:08, Guillermo Arias del Río (<a href="javascript:" target="_blank" gdf-obfuscated-mailto="fBBv5Pl2vqMJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">arias...@...) a écrit:

Hi, how can I specify a not dynamic script as a filter? The documentation shows how to specify a dynamic one:

<a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-script-filter.html#query-dsl-script-filter" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Fquery-dsl-script-filter.html%23query-dsl-script-filter\46sa\75D\46sntz\0751\46usg\75AFQjCNGjx22xkWkGvsPsxifWFeyf73jBiQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Fquery-dsl-script-filter.html%23query-dsl-script-filter\46sa\75D\46sntz\0751\46usg\75AFQjCNGjx22xkWkGvsPsxifWFeyf73jBiQ';return true;">http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-script-filter.html#query-dsl-script-filter

I would like to call a stored script, like in the example with the "calculate-score" function in:

<a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Fmodules-scripting.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHEc6S5Ry7IU4j86lJBTwK8tD0DBQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Fmodules-scripting.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHEc6S5Ry7IU4j86lJBTwK8tD0DBQ';return true;">http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="fBBv5Pl2vqMJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">elasticsearc...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/elasticsearch/36585348-ba0e-4278-9b20-4c15906a8ef8%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/36585348-ba0e-4278-9b20-4c15906a8ef8%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/36585348-ba0e-4278-9b20-4c15906a8ef8%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;"> https://groups.google.com/d/msgid/elasticsearch/36585348-ba0e-4278-9b20-4c15906a8ef8%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/70d24648-f0bb-4f64-aa62-ccb833344662%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.