Actions16
- Index Actions
- Vector Actions
- Metadata Actions
- Utility Actions
Metadata → Create Index
AI-generatedOverview
This node enables interaction with Cloudflare Vectorize vector databases, specifically focusing on managing metadata indexes for filtering vector queries. The "Create Index" operation under the "Metadata" resource allows users to create a metadata index on a specified property of vectors stored in a vector index. This metadata indexing facilitates efficient filtering during semantic search or retrieval operations by enabling queries to filter vectors based on metadata properties.
Practical scenarios include:
- Creating filters on textual, numeric, or boolean metadata fields associated with vectors to refine search results.
- Enabling advanced query capabilities where only vectors matching certain metadata criteria are considered.
- Managing metadata indexes to optimize performance and relevance in semantic search applications.
Example: If you have vectors representing documents with metadata like "category" (string) or "rating" (number), creating metadata indexes on these properties allows you to filter search results to only those documents within a specific category or rating range.
Properties
| Name | Meaning |
|---|---|
| Index Name | The name of the Vectorize index where the metadata index will be created. Must be lowercase, contain only letters, numbers, and hyphens. |
| Property Name | The name of the metadata property to index for filtering purposes. |
| Property Type | The data type of the metadata property. Options: - String: Text values (first 64 bytes indexed) - Number: Numeric values (float64 precision) - Boolean: True/false values |
Output
The output JSON object includes:
mutationId: A unique identifier for the metadata index creation operation.propertyName: The name of the metadata property that was indexed.type: The data type of the indexed metadata property (string, number, or boolean).
This confirms successful creation of the metadata index and provides details about the indexed property.
Dependencies
- Requires an active connection to Cloudflare Vectorize vector database service.
- Needs an API authentication token credential configured in n8n to authorize requests.
- Utilizes internal utility functions from bundled dependencies to interact with the Cloudflare Vectorize API.
Troubleshooting
Common Issues:
- Invalid
Index Name: Ensure the index name is lowercase and contains only letters, numbers, and hyphens. - Property name conflicts: Attempting to create an index on a property that already has an index may cause errors.
- Incorrect property type: The property type must match the actual data type of the metadata property in the vectors.
- Invalid
Error Messages:
"Unknown metadata operation": Occurs if an unsupported operation is specified; verify the operation parameter is set to "createIndex".- API errors related to authentication or permissions: Check that the API key credential is valid and has sufficient rights.
- Validation errors on input parameters: Review the input property values for correctness and completeness.
Resolving these typically involves verifying input parameters, ensuring correct API credentials, and confirming the target vector index exists.