weaviate / weaviate/weaviate-python-client
Throw error message when trying to update vector index type configuration in a collection
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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