Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete an Index of Weaviate with docarray API #1735

Open
3 of 7 tasks
isspek opened this issue Jul 30, 2023 · 6 comments
Open
3 of 7 tasks

Delete an Index of Weaviate with docarray API #1735

isspek opened this issue Jul 30, 2023 · 6 comments

Comments

@isspek
Copy link

isspek commented Jul 30, 2023

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

@JoanFM
Copy link
Member

JoanFM commented Jul 30, 2023

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

@hsm207
Copy link
Collaborator

hsm207 commented Jul 31, 2023

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

@isspek
Copy link
Author

isspek commented Jul 31, 2023

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

@hsm207
Copy link
Collaborator

hsm207 commented Jul 31, 2023

@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"]]

@JoanFM
Copy link
Member

JoanFM commented Jul 31, 2023

u could use the execute_query method

@samedovzaur
Copy link

samedovzaur commented Aug 7, 2023

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
Labels
None yet
Projects
Status: Todo/Bug
Development

No branches or pull requests

4 participants