643bb20137
* Add a new query type - ScriptScoreQuery script_score query uses script to calculate document scores. Added as a substitute for function_score with an intentation to deprecate function_scoreq query. ```http GET /_search { "query": { "script_score" : { "query": { "match": { "message": "elasticsearch" } }, "script" : { "source": "Math.log(2 + doc['likes'].value)" }, "min_score" : 2 } } } ``` Add several functions to painless to be used inside script_score: double rational(double, double) double sigmoid(double, double, double) double randomNotReproducible() double randomReproducible(String, int) double decayGeoLinear(String, String, String, double, GeoPoint) double decayGeoExp(String, String, String, double, GeoPoint) double decayGeoGauss(String, String, String, double, GeoPoint) double decayNumericLinear(String, String, String, double, double) double decayNumericExp(String, String, String, double, double) double decayNumericGauss(String, String, String, double, double) double decayDateLinear(String, String, String, double, JodaCompatibleZonedDateTime) double decayDateExp(String, String, String, double, JodaCompatibleZonedDateTime) double decayDateGauss(String, String, String, double, JodaCompatibleZonedDateTime) Date functions only works on dates in the default format and default time zone |
||
---|---|---|
.. | ||
bool-query.asciidoc | ||
boosting-query.asciidoc | ||
common-terms-query.asciidoc | ||
compound-queries.asciidoc | ||
constant-score-query.asciidoc | ||
dis-max-query.asciidoc | ||
exists-query.asciidoc | ||
feature-query.asciidoc | ||
full-text-queries.asciidoc | ||
function-score-query.asciidoc | ||
fuzzy-query.asciidoc | ||
geo-bounding-box-query.asciidoc | ||
geo-distance-query.asciidoc | ||
geo-polygon-query.asciidoc | ||
geo-queries.asciidoc | ||
geo-shape-query.asciidoc | ||
has-child-query.asciidoc | ||
has-parent-query.asciidoc | ||
ids-query.asciidoc | ||
joining-queries.asciidoc | ||
match-all-query.asciidoc | ||
match-phrase-prefix-query.asciidoc | ||
match-phrase-query.asciidoc | ||
match-query.asciidoc | ||
minimum-should-match.asciidoc | ||
mlt-query.asciidoc | ||
multi-match-query.asciidoc | ||
multi-term-rewrite.asciidoc | ||
nested-query.asciidoc | ||
parent-id-query.asciidoc | ||
percolate-query.asciidoc | ||
prefix-query.asciidoc | ||
query-string-query.asciidoc | ||
query-string-syntax.asciidoc | ||
query_filter_context.asciidoc | ||
range-query.asciidoc | ||
regexp-query.asciidoc | ||
regexp-syntax.asciidoc | ||
script-query.asciidoc | ||
script-score-query.asciidoc | ||
simple-query-string-query.asciidoc | ||
span-containing-query.asciidoc | ||
span-field-masking-query.asciidoc | ||
span-first-query.asciidoc | ||
span-multi-term-query.asciidoc | ||
span-near-query.asciidoc | ||
span-not-query.asciidoc | ||
span-or-query.asciidoc | ||
span-queries.asciidoc | ||
span-term-query.asciidoc | ||
span-within-query.asciidoc | ||
special-queries.asciidoc | ||
term-level-queries.asciidoc | ||
term-query.asciidoc | ||
terms-query.asciidoc | ||
terms-set-query.asciidoc | ||
type-query.asciidoc | ||
wildcard-query.asciidoc | ||
wrapper-query.asciidoc |