Actions16
- Index Actions
- Vector Actions
- Metadata Actions
- Utility Actions
Index → Create
AI-generatedOverview
This node enables management and interaction with Cloudflare Vectorize vector databases. Specifically, the "Index - Create" operation allows users to create a new vector index with customizable dimensions and similarity metrics. This is useful for setting up a vector database tailored to specific embedding sizes and similarity calculations, which can then be used for semantic search, recommendation systems, or AI-driven retrieval augmented generation (RAG) workflows.
Practical examples include:
- Creating an index to store OpenAI text embeddings (dimension 1536) for semantic document search.
- Setting up an index with Euclidean distance metric for spatial data applications.
- Defining a custom index description to clarify its purpose in a multi-index environment.
Properties
| Name | Meaning |
|---|---|
| Index Name | The unique name of the new vector index. Must be lowercase and contain only letters, numbers, and hyphens. |
| Dimensions | Number of dimensions for vectors stored in this index. Must match the dimension of vectors you plan to insert. Common values: 1536 (OpenAI), 768 (sentence-transformers), 384 (MiniLM). |
| Distance Metric | The similarity metric used for vector comparisons. Options: Cosine (recommended for most text embeddings), Euclidean (good for spatial/magnitude-sensitive data), Dot Product (fast but requires normalized vectors). |
| Description | Optional textual description to help identify the index's purpose. |
Output
The output JSON contains an index object representing the newly created vector index. This typically includes metadata about the index such as its name, configuration (dimensions and metric), and any description provided.
Example output structure:
{
"index": {
"name": "example-index",
"description": "Optional description",
"config": {
"dimensions": 1536,
"metric": "cosine"
}
}
}
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authenticating with the Cloudflare Vectorize service.
- Relies on the Cloudflare Vectorize API endpoints for index creation.
- No additional external dependencies beyond the configured API authentication.
Troubleshooting
Common issues:
- Using an index name with uppercase letters or invalid characters will likely cause an error; ensure the name is lowercase and only contains letters, numbers, and hyphens.
- Mismatched vector dimensions during later vector insertion can cause failures; ensure the
dimensionsproperty matches your vector data. - Attempting to create an index with a name that already exists will result in an error; choose a unique index name.
Error messages:
"Unknown index operation": Indicates an unsupported operation was requested; verify the operation parameter is set to "create".- API errors related to authentication or quota limits may occur if the API key is invalid or usage limits are exceeded.
Resolution tips:
- Validate input parameters carefully before execution.
- Check API credentials and permissions.
- Review Cloudflare Vectorize service status if persistent errors occur.