Skip to main content

indexes

Creates, updates, deletes, gets or lists an indexes resource.

Overview

Nameindexes
TypeResource
Idcloudflare.vectorize.indexes

Fields

The following fields are returned by SELECT queries:

Query Vectors Response

NameDatatypeDescription
errorsarray
messagesarray
resultobject
successbooleanWhether the API call was successful (true)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
query_v2selectaccount_id, index_nameFinds vectors closest to a given vector in an index.
update_indexexecaccount_id, index_name, descriptionUpdates and returns the specified Vectorize Index.
create_delete_by_idsexecaccount_id, index_nameDelete a set of vectors from an index by their vector identifiers.
get_by_idsexecaccount_id, index_nameGet a set of vectors from an index by their vector identifiers.
create_insertexecaccount_id, index_nameInserts vectors into the specified index and returns the count of the vectors successfully inserted.
queryexecaccount_id, index_name, vectorFinds vectors closest to a given vector in an index.
upsertexecaccount_id, index_nameUpserts vectors into the specified index, creating them if they do not exist and returns the count of values and ids successfully inserted.
create_delete_by_ids_v2execaccount_id, index_nameDelete a set of vectors from an index by their vector identifiers.
get_by_ids_v2execaccount_id, index_nameGet a set of vectors from an index by their vector identifiers.
create_insert_v2execaccount_id, index_nameunparsable-behaviorInserts vectors into the specified index and returns a mutation id corresponding to the vectors enqueued for insertion.
upsert_v2execaccount_id, index_nameunparsable-behaviorUpserts vectors into the specified index, creating them if they do not exist and returns a mutation id corresponding to the vectors enqueued for upsertion.

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.
unparsable-behaviorstring

SELECT examples

Finds vectors closest to a given vector in an index.

SELECT
errors,
messages,
result,
success
FROM cloudflare.vectorize.indexes
WHERE account_id = '{{ account_id }}' -- required
AND index_name = '{{ index_name }}' -- required
;

Lifecycle Methods

Updates and returns the specified Vectorize Index.

EXEC cloudflare.vectorize.indexes.update_index
@account_id='{{ account_id }}' --required,
@index_name='{{ index_name }}' --required
@@json=
'{
"description": "{{ description }}"
}'
;