This action is irreversible. Proceed with caution.
To delete an existing encrypted index, you can connect to it and then call the delete_index() method.
from cyborgdb import Client# Create a clientclient = Client( base_url='http://localhost:8000', api_key='your-api-key')# Provide the same index key and config used when creating the indexindex_key = your_existing_32_byte_key # Must be the same key used originally# Connect to the existing indexindex = client.load_index( index_name="my_index", index_key=index_key)# Delete the indexindex.delete_index()
import { Client } from 'cyborgdb';// Create a clientconst client = new Client({ baseUrl: 'http://localhost:8000', apiKey: 'your-api-key'});// Provide the same index key and config used when creating the indexconst indexKey = yourExisting32ByteKey; // Must be the same key used originally// Connect to the existing indexconst index = await client.loadIndex({ indexName: "my_index", indexKey});// Delete the indexawait index.deleteIndex();
import { Client } from 'cyborgdb';// Create a clientconst client = new Client({ baseUrl: 'http://localhost:8000', apiKey: 'your-api-key'});// Provide the same index key and config used when creating the indexconst indexKey = yourExisting32ByteKey; // Must be the same key used originally// Connect to the existing indexconst index = await client.loadIndex({ indexName: "my_index", indexKey});// Delete the indexawait index.deleteIndex();
package mainimport ( "context" "log" "github.com/cyborginc/cyborgdb-go")// Create clientclient, err := cyborgdb.NewClient("http://localhost:8000", "your-api-key")if err != nil { log.Fatal(err)}// Provide the same index key used when creating the indexindexKey := []byte("your-existing-32-byte-key") // Must be the same key used originally// Connect to the existing indexindex, err := client.LoadIndex(context.Background(), "my_index", indexKey)if err != nil { log.Fatal(err)}// Delete the indexerr = index.DeleteIndex(context.Background())if err != nil { log.Fatal(err)}