This meta-issue covers the work needed to enable scoring when using running full-text queries in ES|QL.
High Level Vision: score is just a regular column, no magic
Scoring is enabled through a METADATA field, _score. For example,
FROM employees METADATA _score
| WHERE title:"test"
| SORT _score
Scoring is explicit, opt-in ( via METADATA )
By adding METADATA _score a score column is added to the table
The _score column is “dynamic”, potentially any command could alter it
WHERE .. MATCH will affect the score (in the same as an ES query would)
No implicit sorting on score. Sorting can be achieved through existing commands, e.g. a | SORT _score
### Tasks
- [ ] enable scoring with METADATA _score: #113120
- [ ] retain the scores of a single full text operation with multiple full text functions/operators
- [ ] clarify valid _score overrides
- [ ] make score collector parameters configurable/inferrable
- [ ] clarify scoring behavior with subqueries
- [ ] test for scoring consistency across _search and ES|QL with METADATA _score
This meta-issue covers the work needed to enable scoring when using running full-text queries in ES|QL.
High Level Vision: score is just a regular column, no magic
Scoring is enabled through a
METADATA
field,_score
. For example,METADATA _score
a score column is added to the table_score
column is “dynamic”, potentially any command could alter it| SORT _score