A simple script (for a term facet) would fail often with a
java.lang.VerifyError (but not always, even with identical input). Replaced
it with a js script, which appears to work reliably. Anyone else ran into
such an issue?
Couldn't even report the issue, because the mvel project appears to have
moved to Github, but doesn't have the issue tracker enabled...
**** COMPILER BUG! REPORT THIS IMMEDIATELY AT
http://jira.codehaus.org/browse/mvel2
Expression:
d=doc['timestamp'].date;d.addMinutes(-480);y=d.monthOfYear();return y
Exception in thread "elasticsearch[Bloke][search][T#1]"
java.lang.VerifyError: (class: ASMAccessorImpl_10564968941354674830020,
method: getValue signature:
(Ljava/lang/Object;Ljava/lang/Object;Lorg/elasticsearch/common/mvel2/integration/VariableResolverFactory;)Ljava/lang/Object;)
Expecting to find integer on stack
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.newInstance0(Class.java:326)
at java.lang.Class.newInstance(Class.java:308)
at
org.elasticsearch.common.mvel2.optimizers.impl.asm.ASMAccessorOptimizer._initializeAccessor(ASMAccessorOptimizer.java:725)
at
org.elasticsearch.common.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:859)
at
org.elasticsearch.common.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:243)
at
org.elasticsearch.common.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:90)
at
org.elasticsearch.common.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:64)
at
org.elasticsearch.common.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108)
at
org.elasticsearch.common.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
at
org.elasticsearch.common.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123)
at
org.elasticsearch.common.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119)
at
org.elasticsearch.script.mvel.MvelScriptEngineService$MvelSearchScript.run(MvelScriptEngineService.java:192)
at
org.elasticsearch.search.facet.terms.strings.ScriptTermsStringFieldFacetCollector.doCollect(ScriptTermsStringFieldFacetCollector.java:91)
at
org.elasticsearch.search.facet.AbstractFacetCollector.collect(AbstractFacetCollector.java:89)
at
org.elasticsearch.common.lucene.MultiCollector.collect(MultiCollector.java:59)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at
org.apache.lucene.search.ConstantScoreQuery$ConstantScorer.score(ConstantScoreQuery.java:241)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:581)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:195)
at
org.elasticsearch.search.internal.ContextIndexSearcher.search(ContextIndexSearcher.java:149)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:487)
at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:400)
at
org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:176)
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:308)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:242)
at
org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryAndFetchAction.java:75)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:205)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:192)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:178)
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:662)
--