Skip to content

Forbid negative query scores #33309

Closed
Closed
@jimczi

Description

Negative scores are not allowed in Lucene 8 so we should make sure that we don't produce any deliberately. The following is an (hopefully) exhaustive list of places where negative values should be forbidden in es 7 and deprecated in 6x:

Query and field boosts are trivial, negative values can be detected during the parsing of the query. For similarities and scripts we cannot infer easily if the values can be negative or not so we'll have to check scores during query execution and fail the request if a negative score is produced.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions