My application uses this script to increase the number of last elements in the index:
(5 / ((3.16*pow(10,-11)) * abs(time() - doc[\'date\'].date.getMillis()) + 0.2)) + 1.0
It is written in MVEL, but with 1.3 MVEL is deprecated for Groovy. The script now raises this error:
GroovyScriptExecutionException[MissingMethodException[No signature of method: Script4.time() is applicable for argument types: () values: []\nPossible solutions: find(), dump(), find(groovy.lang.Closure), use([Ljava.lang.Object;), is(java.lang.Object), with(groovy.lang.Closure)]]
This sounds to me like a function for getting a millisecond timestamp in Groovy. I tried System.currentTimeMillis(), but he gave another error, saying that it does not support import.
So, how can I fix a function time()to work with Groovy?
Jonah source
share