Anyway i thought i may need to explicitly declare i'm using groovy so i added 
"groovy" as a second parameter to my scriptFunction
And there i got the following error: script_lang not supported [groovy]

Indeed, that's what you need to do. It should work I think. Never played with 
it though.

You may also need to activate explicitly dynamic scripting: 
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html#_enabling_dynamic_scripting
Although I think it's not required here as you are using Groovy.

For sure, you don't need and you must not install groovy lang plugin. That's 
why we did not release it for es-1.3 by the way.

You don't have any other node connected running within your cluster I guess.

Any chance you could share your test class as a Gist? 

-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 29 juillet 2014 à 17:57:30, Laurent T. (lau.thou...@gmail.com) a écrit:

Hi,

I'm upgrading my plugin to 1.3.0 from 0.90.3 and i'm having some troubles with 
my customScoreQuery that has become a functionScoreQuery.

Here's what i did: I changed the ES version to 1.3.0 in my pom.xml, adapted my 
code regarding classes and methods that did not exists anymore so it compiles 
and launched the tests.

Just to be clear, my tests are executed in local mode. My client is generated 
using
client = NodeBuilder.nodeBuilder().local(true).node().client();

So the test about customizing the score fails with the following error: dynamic 
scripting for [mvel] disabled
I expected that as I think i read it somewhere in the changelogs. Here's what 
the code looks like:

QueryBuilders.functionScoreQuery(theQuery).add(ScoreFunctionBuilders.scriptFunction("_score
 * (doc['doc_boost'].empty ? 1 : doc['doc_boost'].value)"));

If mvel is disabled, shouldn't groovy handle this automatically ? or is my code 
not groovy-compliant ?

Anyway i thought i may need to explicitly declare i'm using groovy so i added 
"groovy" as a second parameter to my scriptFunction
And there i got the following error: script_lang not supported [groovy]

I tried adding the elasticsearch-lang-groovy artifact to my pom.xml but that 
only resulted in hundred of errors that looked like conflicts as if ES already 
carried groovy in it's package (which I just checked and seems to be the case).
I think this is all due to the local node that may not be loading up the groovy 
plugin but i have no clue on how to do so.

Any ideas ?

Thanks
Regards
Laurent


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/fa033353-c2f4-4f93-87d7-6247835d43b5%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 elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/etPan.53d7c744.625558ec.f0d0%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.

Reply via email to