Skip to main content

metadata_index

Creates, updates, deletes, gets or lists a metadata_index resource.

Overview

Namemetadata_index
TypeResource
Idcloudflare.vectorize.metadata_index

Fields

The following fields are returned by SELECT queries:

List Metadata Index Response

NameDatatypeDescription
indexTypestringSpecifies the type of indexed metadata property. (string, number, boolean)
propertyNamestringSpecifies the indexed metadata property. (example: random_metadata_property)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_id, index_nameList Metadata Indexes for the specified Vectorize Index.
create_v2execaccount_id, index_name, propertyName, indexTypeEnable metadata filtering based on metadata property. Limited to 10 properties.
create_delete_v2execaccount_id, index_name, propertyNameAllow 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
index_namestringThe Vectorize index name.

SELECT examples

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

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 }}"
}'
;