weaviate / weaviate/weaviate-python-client

Throw error message when trying to update vector index type configuration in a collection

Open
#1,277 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

usability
Dominant language
Python
Stars
227
Forks
151
Avg merge
3d 14h
Merged PRs (30d)
11

Description

Background: I have been running latency tests to compare results of hnsw, flat and dynamic vector indexes. While inserting objects I realised , I had incorrectly configured the collection to flat when I had to configure it to dynamic index. I tried to update the vector index config in the collection using the following python code. The script did not throw any error. However, the vector index did not update to dynamic . It continued showing flat index.

from weaviate.classes.config import Reconfigure

# Get the Article collection object
dynamicTestCollection = client.collections.get("Testingdynamicindexings")

# Update the collection configuration
dynamicTestCollection.config.update(
    vectorizer_config= Reconfigure.VectorIndex.dynamic()
)

Actual result: The client did not throw error message stating that vector index cannot be updated from hnsw or flat or dynamic

Expected result: The client should throw an error. Vector index type cannot be changed by changing the config. The objects have be to fully reindex (unfortunately).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the collection configuration update entry point used by dynamicTestCollection.config.update and inspect how Reconfigure.VectorIndex changes are handled. Add regression coverage for attempts to change between hnsw, flat, and dynamic, and verify that each invalid change raises an error explaining that reindexing is required.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.