-
-
Notifications
You must be signed in to change notification settings - Fork 251
Open
Labels
type:docsDocumentationDocumentation
Description
It would be good to have the possibility to use script sorting of ElasticSearch. E.g.:
{
"sort": {
"_script": {
"type": "number",
"script": "return rdoc['nutrient_220_rda_rate'].value + doc['nutrient_221_rda_rate'].value",
"lang": "groovy",
"order": "asc"
}
}
}
It is possible to use script field:
$query->fields = array_merge($allFields, [
'rda_sum' => "doc['nutrient_220_rda_rate'].value + doc['nutrient_221_rda_rate'].value",
]);
It would be the best if we could use such a script field in the orderBy method.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type:docsDocumentationDocumentation