Preloaded Script Field Failure

I have a filtered, custom_score query that uses a pre-loaded script to
score documents. Here's a gist of it:

However, every time I run the query elasticsearch returns this error:

I have a script called scriptscore.mvel in /config/scripts. I'm using
elasticsearch 17.6. When I pass in a script expression inline, it
works great. Any idea why this would be happening?

Can you gist hte mvel script, and a gist for something that init a node with
some data and executes the offending search request? Looked at the failure,
strange one...

On Thu, Sep 8, 2011 at 2:59 AM, Chris christopherdavidolivares@gmail.comwrote:

I have a filtered, custom_score query that uses a pre-loaded script to
score documents. Here's a gist of it:

Custom Script Query · GitHub

However, every time I run the query elasticsearch returns this error:

gist:1202208 · GitHub

I have a script called scriptscore.mvel in /config/scripts. I'm using
elasticsearch 17.6. When I pass in a script expression inline, it
works great. Any idea why this would be happening?

Hey Shay,

I was able to pinpoint the term that was causing the error, but I'm
not sure what its value was on return time. I've extracted the
portion of my script that causes into this gist.

When I simply return integers/floats from the script, everything works
fine. Maybe somehow this term is returning a nulled out value that
causes the failure?

Along the same lines, is there an effective way to debug preloaded
scripts in elasticsearch? I basically have to debug by trial and
error now.

Thanks for the help!

On Sep 8, 10:44 am, Shay Banon kim...@gmail.com wrote:

Can you gist hte mvel script, and a gist for something that init a node with
some data and executes the offending search request? Looked at the failure,
strange one...

On Thu, Sep 8, 2011 at 2:59 AM, Chris christopherdavidoliva...@gmail.comwrote:

I have a filtered, custom_score query that uses a pre-loaded script to
score documents. Here's a gist of it:

Custom Script Query · GitHub

However, every time I run the query elasticsearch returns this error:

gist:1202208 · GitHub

I have a script called scriptscore.mvel in /config/scripts. I'm using
elasticsearch 17.6. When I pass in a script expression inline, it
works great. Any idea why this would be happening?

I was able to pinpoint the term that was causing the error, but I'm
not sure what its value was on return time. I've extracted the
portion of my script that causes the error into this gist.

When I simply return integers/floats from the script, everything works
fine. Maybe this term is returning a nulled out value that
causes the failure?

Along the same lines, is there an effective way to debug preloaded
scripts in elasticsearch? I basically have to debug by trial and
error now.

On Sep 8, 10:44 am, Shay Banon kim...@gmail.com wrote:

Can you gist hte mvel script, and a gist for something that init a node with
some data and executes the offending search request? Looked at the failure,
strange one...

On Thu, Sep 8, 2011 at 2:59 AM, Chris christopherdavidoliva...@gmail.comwrote:

I have a filtered, custom_score query that uses a pre-loaded script to
score documents. Here's a gist of it:

Custom Script Query · GitHub

However, every time I run the query elasticsearch returns this error:

gist:1202208 · GitHub

I have a script called scriptscore.mvel in /config/scripts. I'm using
elasticsearch 17.6. When I pass in a script expression inline, it
works great. Any idea why this would be happening?

On Sun, Sep 11, 2011 at 3:07 AM, Chris
christopherdavidolivares@gmail.comwrote:

Hey Shay,

I was able to pinpoint the term that was causing the error, but I'm
not sure what its value was on return time. I've extracted the
portion of my script that causes into this gist.

gist:1208980 · GitHub

When I simply return integers/floats from the script, everything works
fine. Maybe somehow this term is returning a nulled out value that
causes the failure?

Which term are you referring to? The result of the script? It will not cause
the failure you provided before. A simple recreation would really help.

Along the same lines, is there an effective way to debug preloaded
scripts in elasticsearch? I basically have to debug by trial and
error now.

Not sure what you mean by debug? debug prints? actual debugger?

Thanks for the help!

On Sep 8, 10:44 am, Shay Banon kim...@gmail.com wrote:

Can you gist hte mvel script, and a gist for something that init a node
with
some data and executes the offending search request? Looked at the
failure,
strange one...

On Thu, Sep 8, 2011 at 2:59 AM, Chris <
christopherdavidoliva...@gmail.com>wrote:

I have a filtered, custom_score query that uses a pre-loaded script to
score documents. Here's a gist of it:

Custom Script Query · GitHub

However, every time I run the query elasticsearch returns this error:

gist:1202208 · GitHub

I have a script called scriptscore.mvel in /config/scripts. I'm using
elasticsearch 17.6. When I pass in a script expression inline, it
works great. Any idea why this would be happening?