Mvel and data types

When I use an mvel script on a field I've mapped as byte, I get an error,
below.
When I changed my mvel script from
doc['age'].value>param3 ? .....
to
doc['age'].doubleValue>param3 ? .....

The error went away.

Questions:

  1. Can I tweak my mvel script so that I don't need to convert from byte?
    Should I convert my parameter to byte? If so, how/where?
  2. What is the best practice here?

The error:

[2012-11-30 11:37:11,093][DEBUG][action.search.type ] [Algrim the
Strong] [haw_index][2], node[Dz4WxCv0TdKyZiodaEepRg], [P], s[STARTED]:
Failed to execute [org.elasticsearch.action.search.SearchRequest@1599f755]
org.elasticsearch.search.query.QueryPhaseExecutionException:
[haw_index][2]: ..... .....: Query Failed [Failed to
execute main query]
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:198)
at
org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:234)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:140)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:204)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:191)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:177)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: [Error: internal error: 113]
[Near : {... doc['age'].value>param3 ? pow( ....}]
^
[Line: 1, Column: 1]
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:439)
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:142)
at
org.elasticsearch.common.mvel2.optimizers.dynamic.DynamicOptimizer.optimizeAccessor(DynamicOptimizer.java:67)
at org.elasticsearch.common.mvel2.ast.ASTNode.optimize(ASTNode.java:157)
at
org.elasticsearch.common.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:113)
at
org.elasticsearch.common.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:116)
at org.elasticsearch.common.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
at
org.elasticsearch.common.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:123)
at
org.elasticsearch.common.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:116)
at
org.elasticsearch.script.mvel.MvelScriptEngineService$MvelSearchScript.run(MvelScriptEngineService.java:192)
at
org.elasticsearch.script.mvel.MvelScriptEngineService$MvelSearchScript.runAsFloat(MvelScriptEngineService.java:197)
at
org.elasticsearch.index.query.CustomScoreQueryParser$ScriptScoreFunction.factor(CustomScoreQueryParser.java:129)
at
org.elasticsearch.common.lucene.search.function.FiltersFunctionScoreQuery$CustomBoostFactorScorer.score(FiltersFunctionScoreQuery.java:314)
at
org.apache.lucene.search.TopScoreDocCollector$InOrderTopScoreDocCollector.collect(TopScoreDocCollector.java:47)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:581)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:195)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:445)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:426)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:342)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:330)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:194)
... 9 more
Caused by: java.lang.RuntimeException: internal error: 113
at
org.elasticsearch.common.mvel2.math.MathProcessor.toType(MathProcessor.java:139)
at
org.elasticsearch.common.mvel2.math.MathProcessor.doPrimWrapperArithmetic(MathProcessor.java:90)
at
org.elasticsearch.common.mvel2.math.MathProcessor._doOperations(MathProcessor.java:214)
at
org.elasticsearch.common.mvel2.math.MathProcessor.doOperations(MathProcessor.java:78)
at
org.elasticsearch.common.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:116)
at
org.elasticsearch.common.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:38)
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:959)
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:343)
... 30 more

--

That might be a MVEL issue. I cannot reproduce it based on the information
that you have provided: https://groups.google.com/d/topic/elasticsearch/CddIPlJxvU8/discussion · GitHub I suspect that
the problem might be in the part of the script that you have omitted.
Judging from the stack trace MVEL is trying to cast something to BYTE and
fails. It does it while trying to assign something to the byte field. Do
you have any assignments in this script?

On Friday, November 30, 2012 11:46:06 AM UTC-5, Daniel Weitzenfeld wrote:

When I use an mvel script on a field I've mapped as byte, I get an error,
below.
When I changed my mvel script from
doc['age'].value>param3 ? .....
to
doc['age'].doubleValue>param3 ? .....

The error went away.

Questions:

  1. Can I tweak my mvel script so that I don't need to convert from byte?
    Should I convert my parameter to byte? If so, how/where?
  2. What is the best practice here?

The error:

[2012-11-30 11:37:11,093][DEBUG][action.search.type ] [Algrim the
Strong] [haw_index][2], node[Dz4WxCv0TdKyZiodaEepRg], [P], s[STARTED]:
Failed to execute [org.elasticsearch.action.search.SearchRequest@1599f755]
org.elasticsearch.search.query.QueryPhaseExecutionException:
[haw_index][2]: ..... .....: Query Failed [Failed to
execute main query]
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:198)
at
org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:234)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:140)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:204)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:191)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:177)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: [Error: internal error: 113]
[Near : {... doc['age'].value>param3 ? pow( ....}]
^
[Line: 1, Column: 1]
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:439)
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:142)
at
org.elasticsearch.common.mvel2.optimizers.dynamic.DynamicOptimizer.optimizeAccessor(DynamicOptimizer.java:67)
at org.elasticsearch.common.mvel2.ast.ASTNode.optimize(ASTNode.java:157)
at
org.elasticsearch.common.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:113)
at
org.elasticsearch.common.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:116)
at org.elasticsearch.common.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
at
org.elasticsearch.common.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:123)
at
org.elasticsearch.common.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:116)
at
org.elasticsearch.script.mvel.MvelScriptEngineService$MvelSearchScript.run(MvelScriptEngineService.java:192)
at
org.elasticsearch.script.mvel.MvelScriptEngineService$MvelSearchScript.runAsFloat(MvelScriptEngineService.java:197)
at
org.elasticsearch.index.query.CustomScoreQueryParser$ScriptScoreFunction.factor(CustomScoreQueryParser.java:129)
at
org.elasticsearch.common.lucene.search.function.FiltersFunctionScoreQuery$CustomBoostFactorScorer.score(FiltersFunctionScoreQuery.java:314)
at
org.apache.lucene.search.TopScoreDocCollector$InOrderTopScoreDocCollector.collect(TopScoreDocCollector.java:47)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:581)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:195)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:445)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:426)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:342)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:330)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:194)
... 9 more
Caused by: java.lang.RuntimeException: internal error: 113
at
org.elasticsearch.common.mvel2.math.MathProcessor.toType(MathProcessor.java:139)
at
org.elasticsearch.common.mvel2.math.MathProcessor.doPrimWrapperArithmetic(MathProcessor.java:90)
at
org.elasticsearch.common.mvel2.math.MathProcessor._doOperations(MathProcessor.java:214)
at
org.elasticsearch.common.mvel2.math.MathProcessor.doOperations(MathProcessor.java:78)
at
org.elasticsearch.common.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:116)
at
org.elasticsearch.common.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:38)
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:959)
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:343)
... 30 more

--

Thanks for your reply, Igor. I'm sorry about redacting, it's just that the
custom scoring is a proprietary formula I have to be careful about.

Full script is below. It's from the 'filters' part of a
'custom_filters_score' query...
{
"filter": {
"match_all":{}
},
"script":"doc['age'].value>param3 ?
pow(doc['age'].value-param3,2)*param1 :
pow(doc['age'].value-param3,2)*param2"
}

...and the the relevant bit from the stack trace - I've bolded the relevant
filter and parameters:

org.elasticsearch.search.query.QueryPhaseExecutionException:
[haw_index][0]: query[custom score
(ConstantScore(NotDeleted(org.elasticsearch.common.lucene.search.AndFilter@6caa4303)),
functions: [{filter(:), function [boost[1000.0]]}{filter(:), *function
[script[doc['age'].value>param3 ? pow(doc['age'].value-param3,2)*param1 :
pow(doc['age'].value-param3,2)param2], params
[{_source=org.elasticsearch.search.lookup.SourceLookup@57615e6, param11=45,
param1=0.00383, param10=-0.07694, param2=0.00399, param3=59,
param12=-1.0E-5, param4=1.2, param5=-0.08645, param7=3, param8=-2.44139,
param9=0, param20=-0.07729,
_fields=org.elasticsearch.search.lookup.FieldsLookup@b97b1d7,
_doc=org.elasticsearch.search.lookup.DocLookup@141ca033,
doc=org.elasticsearch.search.lookup.DocLookup@141ca033, param17=0,
param18=-0.07599, param19=0}]]} ....... from[0],size[207]: Query Failed [Failed to execute main
query]

Could it be because it's trying to cast param1 and param2 to byte in order
to multiply them?

On Friday, November 30, 2012 1:20:38 PM UTC-5, Igor Motov wrote:

That might be a MVEL issue. I cannot reproduce it based on the information
that you have provided: https://groups.google.com/d/topic/elasticsearch/CddIPlJxvU8/discussion · GitHub I suspect that
the problem might be in the part of the script that you have omitted.
Judging from the stack trace MVEL is trying to cast something to BYTE and
fails. It does it while trying to assign something to the byte field. Do
you have any assignments in this script?

On Friday, November 30, 2012 11:46:06 AM UTC-5, Daniel Weitzenfeld wrote:

When I use an mvel script on a field I've mapped as byte, I get an error,
below.
When I changed my mvel script from
doc['age'].value>param3 ? .....
to
doc['age'].doubleValue>param3 ? .....

The error went away.

Questions:

  1. Can I tweak my mvel script so that I don't need to convert from byte?
    Should I convert my parameter to byte? If so, how/where?
  2. What is the best practice here?

The error:

[2012-11-30 11:37:11,093][DEBUG][action.search.type ] [Algrim the
Strong] [haw_index][2], node[Dz4WxCv0TdKyZiodaEepRg], [P], s[STARTED]:
Failed to execute [org.elasticsearch.action.search.SearchRequest@1599f755]
org.elasticsearch.search.query.QueryPhaseExecutionException:
[haw_index][2]: ..... .....: Query Failed [Failed to
execute main query]
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:198)
at
org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:234)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:140)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:204)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:191)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:177)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: [Error: internal error: 113]
[Near : {... doc['age'].value>param3 ? pow( ....}]
^
[Line: 1, Column: 1]
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:439)
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:142)
at
org.elasticsearch.common.mvel2.optimizers.dynamic.DynamicOptimizer.optimizeAccessor(DynamicOptimizer.java:67)
at org.elasticsearch.common.mvel2.ast.ASTNode.optimize(ASTNode.java:157)
at
org.elasticsearch.common.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:113)
at
org.elasticsearch.common.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:116)
at org.elasticsearch.common.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
at
org.elasticsearch.common.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:123)
at
org.elasticsearch.common.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:116)
at
org.elasticsearch.script.mvel.MvelScriptEngineService$MvelSearchScript.run(MvelScriptEngineService.java:192)
at
org.elasticsearch.script.mvel.MvelScriptEngineService$MvelSearchScript.runAsFloat(MvelScriptEngineService.java:197)
at
org.elasticsearch.index.query.CustomScoreQueryParser$ScriptScoreFunction.factor(CustomScoreQueryParser.java:129)
at
org.elasticsearch.common.lucene.search.function.FiltersFunctionScoreQuery$CustomBoostFactorScorer.score(FiltersFunctionScoreQuery.java:314)
at
org.apache.lucene.search.TopScoreDocCollector$InOrderTopScoreDocCollector.collect(TopScoreDocCollector.java:47)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:581)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:195)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:445)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:426)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:342)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:330)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:194)
... 9 more
Caused by: java.lang.RuntimeException: internal error: 113
at
org.elasticsearch.common.mvel2.math.MathProcessor.toType(MathProcessor.java:139)
at
org.elasticsearch.common.mvel2.math.MathProcessor.doPrimWrapperArithmetic(MathProcessor.java:90)
at
org.elasticsearch.common.mvel2.math.MathProcessor._doOperations(MathProcessor.java:214)
at
org.elasticsearch.common.mvel2.math.MathProcessor.doOperations(MathProcessor.java:78)
at
org.elasticsearch.common.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:116)
at
org.elasticsearch.common.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:38)
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:959)
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:343)
... 30 more

--

Thanks, I can reproduce it now. It fails on doc['age'].value-param3. It
looks like MVEL just cannot do any arithmetic operations with bytes even if
both operands are bytes. Try calculating doc['age'].value

  • doc['age'].value for example. So, basically, anywhere where byte value is
    used in a formula, you have to convert it to some other numeric type.

On Friday, November 30, 2012 2:29:03 PM UTC-5, Daniel Weitzenfeld wrote:

Thanks for your reply, Igor. I'm sorry about redacting, it's just that
the custom scoring is a proprietary formula I have to be careful about.

Full script is below. It's from the 'filters' part of a
'custom_filters_score' query...
{
"filter": {
"match_all":{}
},
"script":"doc['age'].value>param3 ?
pow(doc['age'].value-param3,2)*param1 :
pow(doc['age'].value-param3,2)*param2"
}

...and the the relevant bit from the stack trace - I've bolded the
relevant filter and parameters:

org.elasticsearch.search.query.QueryPhaseExecutionException:
[haw_index][0]: query[custom score
(ConstantScore(NotDeleted(org.elasticsearch.common.lucene.search.AndFilter@6caa4303)),
functions: [{filter(:), function [boost[1000.0]]}{filter(:), *function
[script[doc['age'].value>param3 ? pow(doc['age'].value-param3,2)*param1 :
pow(doc['age'].value-param3,2)param2], params
[{_source=org.elasticsearch.search.lookup.SourceLookup@57615e6, param11=45,
param1=0.00383, param10=-0.07694, param2=0.00399, param3=59,
param12=-1.0E-5, param4=1.2, param5=-0.08645, param7=3, param8=-2.44139,
param9=0, param20=-0.07729,
_fields=org.elasticsearch.search.lookup.FieldsLookup@b97b1d7,
_doc=org.elasticsearch.search.lookup.DocLookup@141ca033,
doc=org.elasticsearch.search.lookup.DocLookup@141ca033, param17=0,
param18=-0.07599, param19=0}]]} ....... from[0],size[207]: Query Failed [Failed to execute main
query]

Could it be because it's trying to cast param1 and param2 to byte in order
to multiply them?

On Friday, November 30, 2012 1:20:38 PM UTC-5, Igor Motov wrote:

That might be a MVEL issue. I cannot reproduce it based on the
information that you have provided: https://groups.google.com/d/topic/elasticsearch/CddIPlJxvU8/discussion · GitHub I
suspect that the problem might be in the part of the script that you
have omitted. Judging from the stack trace MVEL is trying to cast something
to BYTE and fails. It does it while trying to assign something to the byte
field. Do you have any assignments in this script?

On Friday, November 30, 2012 11:46:06 AM UTC-5, Daniel Weitzenfeld wrote:

When I use an mvel script on a field I've mapped as byte, I get an
error, below.
When I changed my mvel script from
doc['age'].value>param3 ? .....
to
doc['age'].doubleValue>param3 ? .....

The error went away.

Questions:

  1. Can I tweak my mvel script so that I don't need to convert from
    byte? Should I convert my parameter to byte? If so, how/where?
  2. What is the best practice here?

The error:

[2012-11-30 11:37:11,093][DEBUG][action.search.type ] [Algrim the
Strong] [haw_index][2], node[Dz4WxCv0TdKyZiodaEepRg], [P], s[STARTED]:
Failed to execute [org.elasticsearch.action.search.SearchRequest@1599f755]
org.elasticsearch.search.query.QueryPhaseExecutionException:
[haw_index][2]: ..... .....: Query Failed [Failed to
execute main query]
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:198)
at
org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:234)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:140)
at
org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:204)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:191)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:177)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: [Error: internal error: 113]
[Near : {... doc['age'].value>param3 ? pow( ....}]
^
[Line: 1, Column: 1]
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:439)
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:142)
at
org.elasticsearch.common.mvel2.optimizers.dynamic.DynamicOptimizer.optimizeAccessor(DynamicOptimizer.java:67)
at org.elasticsearch.common.mvel2.ast.ASTNode.optimize(ASTNode.java:157)
at
org.elasticsearch.common.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:113)
at
org.elasticsearch.common.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:116)
at
org.elasticsearch.common.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
at
org.elasticsearch.common.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:123)
at
org.elasticsearch.common.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:116)
at
org.elasticsearch.script.mvel.MvelScriptEngineService$MvelSearchScript.run(MvelScriptEngineService.java:192)
at
org.elasticsearch.script.mvel.MvelScriptEngineService$MvelSearchScript.runAsFloat(MvelScriptEngineService.java:197)
at
org.elasticsearch.index.query.CustomScoreQueryParser$ScriptScoreFunction.factor(CustomScoreQueryParser.java:129)
at
org.elasticsearch.common.lucene.search.function.FiltersFunctionScoreQuery$CustomBoostFactorScorer.score(FiltersFunctionScoreQuery.java:314)
at
org.apache.lucene.search.TopScoreDocCollector$InOrderTopScoreDocCollector.collect(TopScoreDocCollector.java:47)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:581)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:195)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:445)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:426)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:342)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:330)
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:194)
... 9 more
Caused by: java.lang.RuntimeException: internal error: 113
at
org.elasticsearch.common.mvel2.math.MathProcessor.toType(MathProcessor.java:139)
at
org.elasticsearch.common.mvel2.math.MathProcessor.doPrimWrapperArithmetic(MathProcessor.java:90)
at
org.elasticsearch.common.mvel2.math.MathProcessor._doOperations(MathProcessor.java:214)
at
org.elasticsearch.common.mvel2.math.MathProcessor.doOperations(MathProcessor.java:78)
at
org.elasticsearch.common.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:116)
at
org.elasticsearch.common.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:38)
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getMethod(ReflectiveAccessorOptimizer.java:959)
at
org.elasticsearch.common.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:343)
... 30 more

--