Whatever message this page gives is out now! Go check it out!

deleteCollection

Last update:
May 18, 2026

Description

Permanently deletes a specific collection and all vector data contained within it.

Syntax

vectorStoreClient.deleteCollection()

Returns

Void

Example

<cfscript>
    vectorStore = VectorStore({
        provider: "pinecone",
        apiKey: application.vectorDB.pinecone.apiKey,
        index: application.vectorDB.pinecone.index,
        serverless: {
            dimension: application.vectorDB.pinecone.serverless.dimension,
            cloud: application.vectorDB.pinecone.serverless.cloud,
            region: application.vectorDB.pinecone.serverless.region,
            deletionProtection: "disabled"
        },
        embeddingModel: {
            provider: "ollama",
            modelName: "all-minilm",
            baseUrl: application.ollamaBaseUrl
        }
    });

    ragService = simpleRAG(
        expandPath("./Documents/nested"),
        chatModel,
        { vectorStore: vectorStore, recursive: true, chunkSize: 200, chunkOverlap: 50 }
    );

    ragService.ingest();

    vectorStore.deleteCollection();
</cfscript>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page