Skip to content

Conversation

@bevzzz
Copy link
Collaborator

@bevzzz bevzzz commented Jun 1, 2025

This PR:

  • adds collection.config.addVector method to support creating new named vectors on the collection. Only named vectors can be created and existing named vectors cannot be modified.
    The method accepts the same arguments as collections.create(... { vectorizers: XXX }) with the exception that anonymous vectors are not permitted, e.g. vectorizer.none().
  • fixes a bug whereby passing a vector with a custom name as a single object and passing it as an array [single object] to collections.create() would result in 2 different behaviors: custom name changed to default vs custom name preserved.
// Both cases should generate vectorConfig: { 'custom': {...} }
collections.create(..., { vectorizers: vectorizer.none('custom') });
collections.create(..., { vectorizers: [vectorizer.none('custom')] });

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 Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@bevzzz bevzzz force-pushed the feat/add-vector branch from 290af02 to 89c6df8 Compare June 1, 2025 14:08
bevzzz added 2 commits June 1, 2025 16:12
Run the new integration test only if the server is > 1.31.0
@bevzzz bevzzz requested a review from a team as a code owner June 2, 2025 07:06
@bevzzz bevzzz self-assigned this Jun 2, 2025
@bevzzz bevzzz merged commit 64d2a2b into main Jun 2, 2025
27 of 28 checks passed
@bevzzz bevzzz deleted the feat/add-vector branch June 2, 2025 13:01
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.

3 participants