Without the score query it takes ~0.3sec (awesome time because lots of
facets. even when sorting ES is nearly that fast for the first query:
<1sec and that without tuning!)
The query takes over 7 sec even for the second query (!?), also when
I'm using the same 'now' in Java via:
long ONE_HOUR= 60 * 3600 * 1000L;
time = (time / ONE_HOUR) * ONE_HOUR;
qb = customScoreQuery(qb).script("return _score * 800 /(10.0e-9 *
("+time+" - doc['dt'].value) + 1);");
Shouldn't caching come into the game then?
Regards,
Peter.
On 17 Jan., 10:01, Shay Banon shay.ba...@elasticsearch.com wrote:
How long does the query takes without the custom score query? Scripts are always compiled, so you can send the same script string over and over again, and if it does not change, the compiled version of it will be used (and just change parameters).
On Sunday, January 16, 2011 at 11:34 PM, Karussell wrote:
ok. got it via:
long time = new Date().getTime();
qb = customScoreQuery(qb).script("return _score * 800 /(10.0e-9 *
("+time+" - doc['dt'].value) + 1);");The problem was that the statement time wasn't found in mvel (!?) ...
But now the query takes > 7sec for only 500k tweets. What can I do?
Also when I'm using the precompiled script via:
qb =
customScoreQuery(qb).script("queryboost").lang("mvel").param("mynow",
new Date().getTime());Regards,
PeterOn 16 Jan., 21:50, Karussell tableyourt...@googlemail.com wrote:
Hi Paul, hi Shay,
Alternatively, and probably faster the suggestion in this thread to boost a date range works:
http://elasticsearch-users.115913.n3.nabble.com/Boost-recent-document...Thanks for the hint, Paul. But I'm more searching for a recency-
boosting which I can better mix with other boostings.My use case is that I have tweets (which have retweetNumber,
date, ...) and I don't want to simply sort against retweetNumber or
latest tweets ... (see jetwick.com for the solr implemention)On 16 Jan., 10:58, Shay Banon shay.ba...@elasticsearch.com wrote:
If you send the script as part of the query request (and not configure it as part of the node), then sending a different script will simply use that one.ok. Is this possible via the Java API too to send the script in the
query?Debugging scripts is a bit annoying.
ah ok, this would have been the next question
Regards,
Peter.