Skip to content

match overwrites scores across queries #30

@maximilianwerk

Description

@maximilianwerk

The example from the documentation does not work as expected. It creates wrong results:

query emb = [1 1 1 1 0]
match emb = [1.  1.2 1.  1.  0. ] score = 1.2806248474865694
match emb = [1.  2.2 2.  1.  0. ] score = 0.19999999999999787
match emb = [1.  0.1 0.  0.  0. ] score = 2.9342801502242417

The reason is, that if only_id is set to False (which is the default), it uses the same in-memory objects if a Document happens to be a match for two queries. Then scores are overwritten.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions