Preloaded script fields in mvel

Hi,

Forgive me lack of knowledge, but, can I create script fields which is
preloaded ?

Because I don't want to send it (the script) with every query.

I have been reading documentation about scripting module, but the only
info about pre-loading is for native (Java) language.

If there is a way to do that please provide an example.

Thank you in advance,

Waldemar

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hey

have you read the paragraph about preloaded scripts at

It uses a python script as example, not native java.
You can put them in your config directory - but have to make sure they are
on every node of your cluster then.

On Thu, Apr 4, 2013 at 1:46 PM, waldemar@pureholidayhomes.com wrote:

Hi,

Forgive me lack of knowledge, but, can I create script fields which is
preloaded ?

Because I don't want to send it (the script) with every query.

I have been reading documentation about scripting module, but the only
info about pre-loading is for native (Java) language.

If there is a way to do that please provide an example.

Thank you in advance,

Waldemar

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Yes Alexander, as I mentioned earlier I have read that.

I can only add, that I've created mvel script under
/config/scripts/hello_m.mvel, but after executing:
curl -XGET http://localhost:9200/marzec/dziewietnascie/_search
-d '{size:1, fields:["_id"], "query":{"match_all": {}},
"script_fields":{"test1":{"script":"hello_m"}}}'

I get error:
{"status":500,"reason":"PropertyAccessException[[Error: unresolvable
property or identifier: hello_m]\n[Near : {... hello_m ....}

On Thursday, 4 April 2013 14:58:25 UTC+2, Alexander Reelsen wrote:

Hey

have you read the paragraph about preloaded scripts at
Elasticsearch Platform — Find real-time answers at scale | Elastic
It uses a python script as example, not native java.
You can put them in your config directory - but have to make sure they are
on every node of your cluster then.

On Thu, Apr 4, 2013 at 1:46 PM, <wald...@pureholidayhomes.com<javascript:>

wrote:

Hi,

Forgive me lack of knowledge, but, can I create script fields which is
preloaded ?

Because I don't want to send it (the script) with every query.

I have been reading documentation about scripting module, but the only
info about pre-loading is for native (Java) language.

If there is a way to do that please provide an example.

Thank you in advance,

Waldemar

--
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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Did you restart the cluster after creating the script?

On Thursday, April 4, 2013 9:15:37 AM UTC-4, wald...@pureholidayhomes.com
wrote:

Yes Alexander, as I mentioned earlier I have read that.

I can only add, that I've created mvel script under
/config/scripts/hello_m.mvel, but after executing:
curl -XGET http://localhost:9200/marzec/dziewietnascie/_search
-d '{size:1, fields:["_id"], "query":{"match_all": {}},
"script_fields":{"test1":{"script":"hello_m"}}}'

I get error:
{"status":500,"reason":"PropertyAccessException[[Error: unresolvable
property or identifier: hello_m]\n[Near : {... hello_m ....}

On Thursday, 4 April 2013 14:58:25 UTC+2, Alexander Reelsen wrote:

Hey

have you read the paragraph about preloaded scripts at
Elasticsearch Platform — Find real-time answers at scale | Elastic
It uses a python script as example, not native java.
You can put them in your config directory - but have to make sure they
are on every node of your cluster then.

On Thu, Apr 4, 2013 at 1:46 PM, wald...@pureholidayhomes.com wrote:

Hi,

Forgive me lack of knowledge, but, can I create script fields which is
preloaded ?

Because I don't want to send it (the script) with every query.

I have been reading documentation about scripting module, but the only
info about pre-loading is for native (Java) language.

If there is a way to do that please provide an example.

Thank you in advance,

Waldemar

--
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 elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Wow Thanks Igor very, very much.
earlier I did not restart the ES.
But after your question I did, an it start working (on my linux server).
But this is strange, because I did that on my windows server, and it did
not take effect :frowning:

So, Thank you, very, very much :slight_smile: ,
Waldemar

On Friday, 5 April 2013 15:56:06 UTC+2, Igor Motov wrote:

Did you restart the cluster after creating the script?

On Thursday, April 4, 2013 9:15:37 AM UTC-4, wald...@pureholidayhomes.comwrote:

Yes Alexander, as I mentioned earlier I have read that.

I can only add, that I've created mvel script under
/config/scripts/hello_m.mvel, but after executing:
curl -XGET http://localhost:9200/marzec/dziewietnascie/_search
-d '{size:1, fields:["_id"], "query":{"match_all": {}},
"script_fields":{"test1":{"script":"hello_m"}}}'

I get error:
{"status":500,"reason":"PropertyAccessException[[Error: unresolvable
property or identifier: hello_m]\n[Near : {... hello_m ....}

On Thursday, 4 April 2013 14:58:25 UTC+2, Alexander Reelsen wrote:

Hey

have you read the paragraph about preloaded scripts at
Elasticsearch Platform — Find real-time answers at scale | Elastic
It uses a python script as example, not native java.
You can put them in your config directory - but have to make sure they
are on every node of your cluster then.

On Thu, Apr 4, 2013 at 1:46 PM, wald...@pureholidayhomes.com wrote:

Hi,

Forgive me lack of knowledge, but, can I create script fields which
is preloaded ?

Because I don't want to send it (the script) with every query.

I have been reading documentation about scripting module, but the
only info about pre-loading is for native (Java) language.

If there is a way to do that please provide an example.

Thank you in advance,

Waldemar

--
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 elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.