Whatever message this page gives is out now! Go check it out!
Topic | You will |
Inline hosted config | Build a struct for Milvus, Pinecone, Qdrant, or Chroma and call vectorStore(config). |
Embedding in the store | Add embeddingModel so add and search accept text only. |
Collections and partitions | Set collectionName, databaseName, namespace, tenantName, or index blocks (Pinecone serverless vs pod) per provider. |
Tune ingest | Chunk content, call addAll in batches, and adjust timeouts and retries for large loads. |
Provider | Typical connection | Highlights |
Milvus | url (gRPC), dimension, optional collectionName, databaseName | Rich index options (metricType, indexType); connectionSettings / retrySettings. |
Pinecone | apiKey, indexName, namespace | Requires either a serverless block or a pod block (not both); all fields inside the chosen block are required. |
Qdrant | url, dimension | Optional apiKey, collectionName; connectionSettings / retrySettings. |
Chroma | url | collectionName, databaseName, tenantName for multi-tenant setups; top-level callTimeout. |
Field | Required | Default | Description |
provider | Yes | — | Provider id, for example openai, azureopenai, mistral, ollama. |
modelName | Yes | — | Model identifier (for example text-embedding-3-small, nomic-embed-text:latest). |
apiKey | Yes* | — | API key where the provider requires it (often not used for local Ollama). |
dimension | Yes | — | Output vector length; must match the vector store dimension and any index dimension (for example Pinecone serverless / pod). |
baseUrl | No | — | Required for Ollama (for example http://localhost:11434). Optional overrides for some cloud APIs. |
maxRetries | No | 3 | Retries for transient embedding API failures. |
timeout | No | 60000 | Timeout in milliseconds for embedding calls. |
logRequests | No | false | Log outbound embedding requests (debugging). |
logResponses | No | false | Log embedding responses (debugging). |
Approach | When to use it |
embeddingModel nested in vectorStore({ ... }) | Normal add / search with text; simplest production path. |
embeddingModel() + embed / embedAll | Custom pipelines, offline batch files, or when you build vector arrays yourself and pass them into add. |
<cfscript>
try {
vectorstoreclient = vectorStore({
"provider": "milvus",
"url": "http://your-milvus-host:19530",
"databaseName": "default",
"collectionName": "cf_docs",
"dimension": 768,
"metricType": "COSINE",
"indexType": "HNSW",
"apiKey": "",
"embeddingModel": {
"provider": "ollama",
"modelName": "nomic-embed-text:latest",
"baseUrl": "http://localhost:11434",
"dimension": 768
}
});
writeDump(vectorstoreclient.add({
"text": "ColdFusion is a rapid application development platform.",
"metadata": { "product": "coldfusion", "year": 2025 }
}));
writeDump(vectorstoreclient.search({
"text": "rapid application development",
"minScore": 0.25,
"topK": 5,
"filter": { "year": 2025 }
}));
}
catch (any e) {
writeDump(e);
}
</cfscript><cfscript>
vectorstoreclient = vectorStore({
"provider": "milvus",
"url": "http://your-milvus-host:19530",
"dimension": 768,
"collectionName": "cf_docs",
"embeddingModel": { /* ... same dimension ... */ },
"connectionSettings": {
"callTimeout": 60,
"connectionTimeout": 20,
"keepAlive": true,
"idleTimeout": 600
},
"retrySettings": {
"maxRetries": 10,
"initialBackoff": 500,
"maxBackoff": 3000,
"backoffMultiplier": 3
}
});
</cfscript>config = {
"provider": "pinecone",
"apiKey": "your-api-key",
"indexName": "my-index",
"namespace": "default",
"serverless": {
"dimension": 128,
"cloud": "aws",
"region": "us-east-1",
"deletionProtection": "disabled"
},
"embeddingModel": {
"provider": "openai",
"modelName": "text-embedding-3-small",
"apiKey": "your-openai-key",
"dimension": 1536
}
};
vectorstoreclient = vectorStore(config); config = {
"provider": "pinecone",
"apiKey": "your-api-key",
"indexName": "my-pod-index",
"namespace": "default",
"pod": {
"dimension": 128,
"environment": "your-environment",
"podType": "your-pod-type"
}
};
vectorstoreclient = vectorStore(config); <cfscript>
try {
vectorstoreclient = vectorStore({
"provider": "qdrant",
"url": "https://your-qdrant.example:6334",
"dimension": 384,
"collectionName": "app_collection",
"metricType": "COSINE",
"embeddingModel": {
"provider": "ollama",
"modelName": "all-minilm:latest",
"baseUrl": "http://localhost:11434",
"dimension": 384
}
});
writeDump(vectorstoreclient.addAll([
{ "text": "First chunk", "metadata": { "doc": "1" } },
{ "text": "Second chunk", "metadata": { "doc": "1" } }
]));
} catch (any e) {
writeDump(e);
}
</cfscript><cfscript>
try {
vectorstoreclient = vectorStore({
"provider": "chroma",
"url": "http://your-chroma-host:8000",
"collectionName": "kb",
"databaseName": "default",
"tenantName": "default",
"callTimeout": 60,
"embeddingModel": {
"provider": "openai",
"modelName": "text-embedding-3-small",
"apiKey": "your-openai-key",
"dimension": 1536
}
});
writeDump(vectorstoreclient.add({
"text": "Sample for Chroma collection.",
"metadata": { "source": "demo" }
}));
} catch (any e) {
writeDump(e);
}
</cfscript>vsConfig = {
"provider": "milvus",
"url": "http://my-host:19530",
"databaseName": "default",
"collectionName": "qatest_milvus",
"dimension": 768,
"indexType": "HNSW",
"metricType": "COSINE",
"embeddingModel": application.embeddingModel
};
vectorstoreclient = vectorStore(vsConfig);<cfscript>
try {
vectorstoreclient = vectorStore({
"provider": "milvus",
"url": "http://your-milvus-host:19530",
"collectionName": "longform_docs",
"dimension": 1536,
"metricType": "COSINE",
"indexType": "IVF_FLAT",
"embeddingModel": {
"provider": "openai",
"modelName": "text-embedding-3-small",
"apiKey": "add-your-openai-key",
"dimension": 1536
},
"connectionSettings": {
"callTimeout": 120,
"connectionTimeout": 30
}
});
chunks = [];
for (i = 1; i <= 20; i++) {
arrayAppend(chunks, {
"text": "Section " & i & " of the manual. Replace with real chunk text.",
"metadata": { "documentId": "manual-2026", "chunkIndex": i }
});
}
writeDump(vectorstoreclient.addAll(chunks));
} catch (any e) {
writeDump(e);
}
</cfscript>