metadata_index
Creates, updates, deletes, gets or lists a metadata_index resource.
Overview
| Name | metadata_index |
| Type | Resource |
| Id | cloudflare.vectorize.metadata_index |
Fields
The following fields are returned by SELECT queries:
- list
List Metadata Index Response
| Name | Datatype | Description |
|---|---|---|
indexType | string | Specifies the type of indexed metadata property. (string, number, boolean) |
propertyName | string | Specifies the indexed metadata property. (example: random_metadata_property) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | account_id, index_name | List Metadata Indexes for the specified Vectorize Index. | |
create_v2 | exec | account_id, index_name, propertyName, indexType | Enable metadata filtering based on metadata property. Limited to 10 properties. | |
create_delete_v2 | exec | account_id, index_name, propertyName | Allow Vectorize to delete the specified metadata index. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
index_name | string | The Vectorize index name. |
SELECT examples
- list
List Metadata Indexes for the specified Vectorize Index.
SELECT
indexType,
propertyName
FROM cloudflare.vectorize.metadata_index
WHERE account_id = '{{ account_id }}' -- required
AND index_name = '{{ index_name }}' -- required
;
Lifecycle Methods
- create_v2
- create_delete_v2
Enable metadata filtering based on metadata property. Limited to 10 properties.
EXEC cloudflare.vectorize.metadata_index.create_v2
@account_id='{{ account_id }}' --required,
@index_name='{{ index_name }}' --required
@@json=
'{
"indexType": "{{ indexType }}",
"propertyName": "{{ propertyName }}"
}'
;
Allow Vectorize to delete the specified metadata index.
EXEC cloudflare.vectorize.metadata_index.create_delete_v2
@account_id='{{ account_id }}' --required,
@index_name='{{ index_name }}' --required
@@json=
'{
"propertyName": "{{ propertyName }}"
}'
;