OpenSearch/docs/reference/query-dsl
Mayya Sharipova 643bb20137
Add a new query type - ScriptScoreQuery (#34533)
* 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
2018-11-20 16:10:06 -05:00
..
bool-query.asciidoc
boosting-query.asciidoc [Doc] Add clarification to boolean query (#32575) 2018-11-16 11:45:32 +09:00
common-terms-query.asciidoc Remove redundant 'minimum_should_match' 2018-06-27 10:11:07 +02:00
compound-queries.asciidoc
constant-score-query.asciidoc
dis-max-query.asciidoc
exists-query.asciidoc Make sure to use the type _doc in the REST documentation. (#34662) 2018-10-22 11:54:04 -07:00
feature-query.asciidoc Add a `feature_vector` field. (#31102) 2018-06-07 10:05:37 +02:00
full-text-queries.asciidoc Unify headers for full text queries 2018-06-27 10:11:14 +02:00
function-score-query.asciidoc Docs: Remove range notation from random score docs (#35093) 2018-10-30 14:12:59 -04:00
fuzzy-query.asciidoc Update Fuzzy Query docs to clarify default behavior re max_expansions (#30819) 2018-07-30 13:19:26 -07:00
geo-bounding-box-query.asciidoc Use geohash cell instead of just a corner in geo_bounding_box (#30698) 2018-05-24 14:46:15 -04:00
geo-distance-query.asciidoc
geo-polygon-query.asciidoc [Docs] Minor formatting and wording fixes (#35278) 2018-11-06 07:52:13 +01:00
geo-queries.asciidoc Minor corrections in geo-queries.asciidoc (#34314) 2018-10-05 17:12:18 +02:00
geo-shape-query.asciidoc Add support for indexed shape routing in geo_shape query (#30760) 2018-05-23 15:15:19 -04:00
has-child-query.asciidoc
has-parent-query.asciidoc
ids-query.asciidoc Remove legacy mapping code. (#29224) 2018-04-11 09:41:37 +02:00
joining-queries.asciidoc
match-all-query.asciidoc
match-phrase-prefix-query.asciidoc
match-phrase-query.asciidoc Add support to match_phrase query for zero_terms_query. (#29598) 2018-04-19 11:25:27 -07:00
match-query.asciidoc [Docs] Update match-query.asciidoc (#33610) 2018-09-12 14:35:27 +02:00
minimum-should-match.asciidoc
mlt-query.asciidoc [DOCS] Removed and params from MLT. Closes #28128 (#31370) 2018-06-19 13:48:13 -07:00
multi-match-query.asciidoc Make limit on number of expanded fields configurable (#35284) 2018-11-08 17:04:40 +01:00
multi-term-rewrite.asciidoc
nested-query.asciidoc Make sure to use the type _doc in the REST documentation. (#34662) 2018-10-22 11:54:04 -07:00
parent-id-query.asciidoc
percolate-query.asciidoc Add a note around using separate indices for percolator queries and documents. (#35109) 2018-11-01 12:41:07 -07:00
prefix-query.asciidoc
query-string-query.asciidoc [Docs] Warn about searching across all fields wt. `query_string` (#35570) 2018-11-19 13:21:59 +01:00
query-string-syntax.asciidoc Fix docs build. 2018-06-05 14:55:40 +02:00
query_filter_context.asciidoc
range-query.asciidoc Docs: Add section about range query for range type (#35222) 2018-11-06 10:49:12 -05:00
regexp-query.asciidoc
regexp-syntax.asciidoc
script-query.asciidoc [Docs] Fix filter context in script-query.asciidoc (#35677) 2018-11-19 16:30:33 +01:00
script-score-query.asciidoc Add a new query type - ScriptScoreQuery (#34533) 2018-11-20 16:10:06 -05:00
simple-query-string-query.asciidoc Make limit on number of expanded fields configurable (#35284) 2018-11-08 17:04:40 +01:00
span-containing-query.asciidoc
span-field-masking-query.asciidoc
span-first-query.asciidoc
span-multi-term-query.asciidoc [Docs] Remove repeating words (#33087) 2018-08-28 13:16:43 +02:00
span-near-query.asciidoc
span-not-query.asciidoc [Docs]Corrected spelling errors. (#28976) 2018-03-19 10:22:40 -07:00
span-or-query.asciidoc
span-queries.asciidoc
span-term-query.asciidoc
span-within-query.asciidoc
special-queries.asciidoc Expose Lucene's FeatureField. (#30618) 2018-05-23 08:55:21 +02:00
term-level-queries.asciidoc [Docs] Add term query with normalizer example 2018-05-03 10:23:14 +02:00
term-query.asciidoc
terms-query.asciidoc
terms-set-query.asciidoc [DOCS] Remove experimental label from term_set query (#34328) 2018-10-05 19:45:23 +02:00
type-query.asciidoc Add a deprecation warning in the type query documentation. (#34017) 2018-09-24 16:30:38 -07:00
wildcard-query.asciidoc
wrapper-query.asciidoc added docs for `wrapper` query. 2018-03-14 11:51:22 +01:00