Passing parameter to native script

Hi.
I have a doubt about this.
Exactly where are we suppose to write this function.
I mean as we are returning AbstractFloatSearchScript I wrote this
function as a part of factory class.
Does this means class returned by my factory is nested class?
I didn't write Script.class at all.
My factory class is at https://gist.github.com/1073346.
Is there any mistake, because I am getting this error continously
git://gist.github.com/1073348.git.
Can anybody help me to where to include this function?

On Jul 2, 1:31 am, Karussell tableyourt...@googlemail.com wrote:

via params:

public ExecutableScript newScript(final Map<String, Object> params) {
return new AbstractFloatSearchScript() {

        @Override
        public float runAsFloat() {
            params.get("xy");

....

}}}

On Jun 30, 3:00 pm, Eugen Zagorodniy e.zagorod...@gmail.com wrote:

Hello!

Is there way to pass parameter tonativescript? For example, if I
execute query

{
"query": {
"custom_score": {
"query": { ... },
"params" : { "x" : "value" },
"lang":"native",
"script":"CustomScript"
}
}

}

  • how do I access value of "x" parameter in thenativescript
    CustomScript?

Thanks!