weaviate / weaviate/weaviate-cli

Add `--drop_vector_index` to `weaviate-cli update collection`

Open
#170 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
31
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Context

Weaviate 1.39 adds an experimental endpoint to drop the index of a named vector
(DELETE /v1/schema/{Class}/vectors/{name}/index), exposed in the Python client via
collection.config.delete_vector_index() (weaviate/weaviate-python-client#1991). The CLI
should let operators drive this destructive, asynchronous, irreversible operation and
observe its lifecycle.

Scope

  • Add --drop_vector_index <name> to update collection (drops one named vector's index).
  • Mutually exclusive with --vector_index; server-version warning (< v1.39.0).
  • The drop must run after config.update() (which reads-and-writes the whole schema),
    otherwise a vectorIndexType: "none" vector would be PUT back to the server.
  • get collection listing must render a dropped vector as none (and not crash when the
    named vector's vector_index_config is None), showing all distinct index types, e.g.
    hnsw, none.
  • Re-issuing the drop on an already-none vector must be allowed (server returns 200):
    it is a no-op while cleanup is in flight and re-enqueues a fresh cleanup task if the
    previous one FAILED — the only operator recovery path for a stalled drop.

Files Involved

  • weaviate_cli/defaults.pyUpdateCollectionDefaults.drop_vector_index
  • weaviate_cli/commands/update.py--drop_vector_index option
  • weaviate_cli/managers/collection_manager.py — validation, ordering, listing fix
  • test/unittests/test_managers/test_collection_manager.py — unit tests
  • requirements-dev.txt / setup.cfg — client dependency (temporary pin to PR #1991)
  • operating skill docs

Acceptance Criteria

  • update collection --drop_vector_index X drops the named vector's index, --json supported
  • Rejected when combined with --vector_index
  • get collection renders none / hnsw, none and never crashes on a dropped vector
  • Re-drop of an already-none vector is accepted (re-trigger), not blocked
  • Unit tests cover happy path, validation, and re-trigger
  • make lint and make test pass
  • Operating skill documentation updated

🤖 Generated with Claude Code

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 in weaviate_cli/defaults.py, commands/update.py, and managers/collection_manager.py, then read the existing collection-manager unit tests. Check the temporary client dependency pin in requirements-dev.txt and setup.cfg before running the tests. Done means the option validates and runs in the required order, supports JSON output and re-triggering, renders none safely, updates operating skill docs, and passes make lint and make test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.