Skip to content

1.37/support drop vector index#418

Draft
tsmith023 wants to merge 2 commits intodev/1.37from
1.37/support-drop-vector-index
Draft

1.37/support drop vector index#418
tsmith023 wants to merge 2 commits intodev/1.37from
1.37/support-drop-vector-index

Conversation

@tsmith023
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown

@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

@tsmith023 tsmith023 marked this pull request as draft April 15, 2026 12:03
*
* This is a destructive operation. The index will need to be regenerated if you wish to use it again.
*
* @param {keyof V & string} [vectorName] The name of the vector to drop the index from. If not provided, the default vector index will be dropped.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* @param {keyof V & string} [vectorName] The name of the vector to drop the index from. If not provided, the default vector index will be dropped.
* @param {keyof V & string} [vectorName] The name of the vector to drop the index from. If not provided, the "default" vector index will be dropped.

Maybe a nit, but I think it's good to be specific about the fact that Weaviate doesn't have the notion of a default vector index, and it's the client that will fallback to "default" input. E.g. if the user's only index is called "my-only-index" they should expect to see an error on dropVectorIndex(undefined).

I would argue this parameter should be required tho, similarly to how when you're trying to delete a GH repo you need to manually enter the repo's name to confirm. Not insisting on it tho, just my first response to vectorName?.

Comment on lines +1117 to +1118
await expect(collection.config.dropVectorIndex('nonexistent')).rejects.toThrow(
'The request to Weaviate failed with status code: 422 and message: {"error":[{"message":"not found: vector index \\"nonexistent\\" not found in class \\"TestDropNonExistentNamedVectorIndex\\""}]}'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does the client generally throws errors on the 200+ HTTP codes? If yes, then it seems like this test is redundant, it essentially tests the server's response to a non-existen input. If no, then let's not assert the contents of the message -- someone may re-phrase that in v1.38 or sth and fail the client pipeline (used to happen a lot in the Java client test suite)

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