Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

Delete an Index of Weaviate with docarray API #1735

Open

Description

@isspek

Initial Checks

  • I have searched Google & GitHub for similar requests and couldn't find anything
  • I have read and followed the docs and still think this feature is missing

Description

Hi everyone,

I started using docarray with Weaviate. My question is about clearing index of Weaviate by using the docarray API. I have set up a collection as shown at the below code. It is a test collection, and want to clear or remove this index after testing. How can I clear/remove it with the docarray library? Thanks a lot!

runtimeconfig = WeaviateDocumentIndex.RuntimeConfig(batch_config=batch_config)
store = WeaviateDocumentIndex[MyIndex](
   host="http://localhost:8080", index_name="MyIndex"
)
store.configure(runtimeconfig) 

Affected Components

Activity

  1. moved this to Todo/Bug in DocArray backlogon Jul 30, 2023
  2. JoanFM commented on Jul 30, 2023

    @JoanFM
    Member

    For the moment you can check the execute_query method where u can pass ur custom Weaviate query to delete ur index (check Weaviate docs for that). On the othrr hand we can try to add a more native API for this method, something like delete or clear

  3. hsm207 commented on Jul 31, 2023

    @hsm207
    Contributor

    @isspek do you mean you want to delete a class in weaviate but using the docarray api?

  4. isspek commented on Jul 31, 2023

    @isspek
    Author

    Hi @hsm207, yes correct. I'd like to do that with the docarray api.

  5. hsm207 commented on Jul 31, 2023

    @hsm207
    Contributor

    @isspek noted. That is not possible at the moment. Right now, only delete by document ids is supported e.g:

    del test_index[["1", "2"]]
  6. JoanFM commented on Jul 31, 2023

    @JoanFM
    Member

    u could use the execute_query method

  7. samedovzaur commented on Aug 7, 2023

    @samedovzaur

    Initial Checks

    • I have searched Google & GitHub for similar requests and couldn't find anything
    • I have read and followed the docs and still think this feature is missing

    Description

    Hi everyone,

    I started using docarray with Weaviate. My question is about clearing index of Weaviate by using the docarray API. I have set up a collection as shown at the below code. It is a test collection, and want to clear or remove this index after testing. How can I clear/remove it with the docarray library? Thanks a lot!

    runtimeconfig = WeaviateDocumentIndex.RuntimeConfig(batch_config=batch_config)
    store = WeaviateDocumentIndex[MyIndex](
       host="http://localhost:8080", index_name="MyIndex"
    )
    store.configure(runtimeconfig) 

    Affected Components

    Instead of deleting that can we update it into an empty string? Just asking :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions