Skip to content

Add --drop_vector_index to weaviate-cli update collection #170

Description

@jfrancoa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions