indexes
Creates, updates, deletes, gets or lists an indexes resource.
Overview
| Name | indexes |
| Type | Resource |
| Id | cloudflare.vectorize.indexes |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
create_delete_by_ids | exec | account_id, index_name | Delete a set of vectors from an index by their vector identifiers. | |
get_by_ids | exec | account_id, index_name | Get a set of vectors from an index by their vector identifiers. | |
create_insert | exec | account_id, index_name | Inserts vectors into the specified index and returns the count of the vectors successfully inserted. | |
query | exec | account_id, index_name, vector | Finds vectors closest to a given vector in an index. | |
upsert | exec | account_id, index_name | Upserts 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_v2 | exec | account_id, index_name | Delete a set of vectors from an index by their vector identifiers. | |
get_by_ids_v2 | exec | account_id, index_name | Get a set of vectors from an index by their vector identifiers. | |
create_insert_v2 | exec | account_id, index_name | unparsable-behavior | Inserts vectors into the specified index and returns a mutation id corresponding to the vectors enqueued for insertion. |
query_v2 | exec | account_id, index_name, vector | Finds vectors closest to a given vector in an index. | |
upsert_v2 | exec | account_id, index_name | unparsable-behavior | Upserts 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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
index_name | string | The Vectorize index name. |
unparsable-behavior | string |
Lifecycle Methods
- create_delete_by_ids
- get_by_ids
- create_insert
- query
- upsert
- create_delete_by_ids_v2
- get_by_ids_v2
- create_insert_v2
- query_v2
- upsert_v2
Delete a set of vectors from an index by their vector identifiers.
EXEC cloudflare.vectorize.indexes.create_delete_by_ids
@account_id='{{ account_id }}' --required,
@index_name='{{ index_name }}' --required
@@json=
'{
"ids": "{{ ids }}"
}'
;
Get a set of vectors from an index by their vector identifiers.
EXEC cloudflare.vectorize.indexes.get_by_ids
@account_id='{{ account_id }}' --required,
@index_name='{{ index_name }}' --required
@@json=
'{
"ids": "{{ ids }}"
}'
;
Inserts vectors into the specified index and returns the count of the vectors successfully inserted.
EXEC cloudflare.vectorize.indexes.create_insert
@account_id='{{ account_id }}' --required,
@index_name='{{ index_name }}' --required
;
Finds vectors closest to a given vector in an index.
EXEC cloudflare.vectorize.indexes.query
@account_id='{{ account_id }}' --required,
@index_name='{{ index_name }}' --required
@@json=
'{
"filter": "{{ filter }}",
"returnMetadata": {{ returnMetadata }},
"returnValues": {{ returnValues }},
"topK": {{ topK }},
"vector": "{{ vector }}"
}'
;
Upserts vectors into the specified index, creating them if they do not exist and returns the count of values and ids successfully inserted.
EXEC cloudflare.vectorize.indexes.upsert
@account_id='{{ account_id }}' --required,
@index_name='{{ index_name }}' --required
;
Delete a set of vectors from an index by their vector identifiers.
EXEC cloudflare.vectorize.indexes.create_delete_by_ids_v2
@account_id='{{ account_id }}' --required,
@index_name='{{ index_name }}' --required
@@json=
'{
"ids": "{{ ids }}"
}'
;
Get a set of vectors from an index by their vector identifiers.
EXEC cloudflare.vectorize.indexes.get_by_ids_v2
@account_id='{{ account_id }}' --required,
@index_name='{{ index_name }}' --required
@@json=
'{
"ids": "{{ ids }}"
}'
;
Inserts vectors into the specified index and returns a mutation id corresponding to the vectors enqueued for insertion.
EXEC cloudflare.vectorize.indexes.create_insert_v2
@account_id='{{ account_id }}' --required,
@index_name='{{ index_name }}' --required,
@unparsable-behavior='{{ unparsable-behavior }}'
;
Finds vectors closest to a given vector in an index.
EXEC cloudflare.vectorize.indexes.query_v2
@account_id='{{ account_id }}' --required,
@index_name='{{ index_name }}' --required
@@json=
'{
"filter": "{{ filter }}",
"returnMetadata": "{{ returnMetadata }}",
"returnValues": {{ returnValues }},
"topK": {{ topK }},
"vector": "{{ vector }}"
}'
;
Upserts vectors into the specified index, creating them if they do not exist and returns a mutation id corresponding to the vectors enqueued for upsertion.
EXEC cloudflare.vectorize.indexes.upsert_v2
@account_id='{{ account_id }}' --required,
@index_name='{{ index_name }}' --required,
@unparsable-behavior='{{ unparsable-behavior }}'
;