IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Sort context
editSort context
editUse a Painless script to sort the documents in a query.
Variables
-
params
(Map
, read-only) - User-defined parameters passed in as part of the query.
-
doc
(Map
, read-only) -
Contains the fields of the current document where each field is a
List
of values. -
_score
(double
read-only) - The similarity score of the current document.
Return
-
double
- The score for the specified document.
API
The standard Painless API is available.