Skip to content

Conversation

@bevzzz
Copy link
Collaborator

@bevzzz bevzzz commented Oct 13, 2025

This PR introduces a concept of "query target" to allow specifying target query vector, assigning weights to different vectors, and using multiple search vectors.

These are applicable to nearVector, nearText, hybrid, and near-media queries.

songs.query.nearVector(
    Target.average(
        Target.vector("v1", new float[]{...}),
        Target.vector("v2", new float[]{...})
    ),
    nv -> nv.distance(.23f)
);

songs.query.nearImage(
    Target.manualWeights(
        "base64-encoded-image",
        Target.weight("v1", .56f),
        Target.weight("v2", .44f)
    ),
    ni -> ni.limit(3)
);

Alongside these it also adds multi-vector configuration options to collection creation:

client.collections.create(
  "With_2d_vectors",
  c -> c
    .multiVector(MultiVector.of(
      mv -> mv.encoding(Encoding.muvera(
        muvera -> muvera.ksim(4)
      ))
    ))
);

Copy link

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

@bevzzz bevzzz marked this pull request as ready for review October 16, 2025 12:13
@bevzzz bevzzz merged commit 423f2f5 into v6 Oct 20, 2025
2 checks passed
@bevzzz bevzzz deleted the v6-target-vectors branch October 20, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants