I played with the master where you fixed the groovy thing. Thanks for
that btw !
Now (only) 353k tweets:
- try mvel with string insertation of mynow/time => ~5s query time
now all experiments are done with mynow as paramter (instead string
2. mvel => 5.2, 4.9, 5.1, 4.8
3. js => 1.0, 0.5, 0.6, 0.5
4. groovy => 1.1, 1.0, 0.8, 0.8
5. python => 1.5, 0.9, 0.9, 0.9
so, really js seems to be the fastest in my case
mvel seems to be slower the more 'complex' my equation is.
unlike js, where it takes nearly always around 0.5s.
"You can never shave enough milliseconds" starts to
dominate my life too much...
I wonder if there is an alternative approach to improve speed.
Couldn't be the document id's be cached in someway?
Or even detect which variables are used (in my case _score and
doc['dt'].value) and cache the results of the equation?
Another idea would be to calculate the result or the _score not too
precise (e.g. cut after 3 decimal points) and then use caching ...
On 18 Jan., 00:31, Shay Banon shay.ba...@elasticsearch.com wrote:
I still wonder if its worth it to have an optimized script engine for numeric based calcs, I will hack with it a bit and see if it make sense. "You can never shave enough milliseconds" starts to dominate my life too much...
On Tuesday, January 18, 2011 at 1:29 AM, Shay Banon wrote:
Though, its strange that mvel is taking this long compared to rhino, sure, it might not get compiled "as much" into bytecode, but still. I will look into it.
On Tuesday, January 18, 2011 at 12:44 AM, Karussell wrote:
(when was the last time we used js to improve performance ? ok, its
only an implementation ... but: nice!)
BTW1: using groovy I got:
Parse Failure [Failed to parse source [na]]]; nested:
ElasticSearchIllegalArgumentException[script_lang not supported
I added the groovy plugin jar like I added the js plugin jar (via
BTW2: I had to restart the node to change the language engine. Would
you mind to add this into the docs? Otherwise one thinks that one is
using the new language for the script but is still using the first one!