Skip to content

ES|QL: Fuse option to customize normalizer per branch #141422

@ioanatia

Description

@ioanatia

The FUSE command right now allows configuring a single normalizer that will be applied on each result set.

FROM books METADATA _id, _index, _score
| FORK (WHERE title:"Shakespeare" | SORT _score DESC)
       (WHERE semantic_title:"Shakespeare" | SORT _score DESC)
| FUSE LINEAR WITH { "weights": { "fork1": 0.7, "fork2": 0.3 }, "normalizer": "minmax" }

We would like to be able to configure a normalizer for each branch of results:

FROM books METADATA _id, _index, _score
| FORK (WHERE title:"Shakespeare" | SORT _score DESC)
       (WHERE semantic_title:"Shakespeare" | SORT _score DESC)
| FUSE LINEAR WITH { "weights": { "fork1": 0.7, "fork2": 0.3 }, "normalizers": { "fork1": "minmax", "fork2": "none" } }

this might be helpful for example when combining lexical + knn results.
the vector search scores could already reside between 0 and 1 and normalization could be skipped for vector results, but still needed for lexical ones.

this feature also brings us closer to parity with the linear retriever, where different normalizers can be applied for each sub retriever.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions