instances_search
Creates, updates, deletes, gets or lists an instances_search resource.
Overview
| Name | instances_search |
| Type | Resource |
| Id | cloudflare.aisearch.instances_search |
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 |
|---|---|---|---|---|
search_by_account | insert | id, account_id | Executes a semantic search query against an AI Search instance to find relevant indexed content. |
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. |
id | string | Resource ID. |
INSERT examples
- search_by_account
- Manifest
Executes a semantic search query against an AI Search instance to find relevant indexed content.
INSERT INTO cloudflare.aisearch.instances_search (
ai_search_options,
messages,
query,
id,
account_id
)
SELECT
'{{ ai_search_options }}',
'{{ messages }}',
'{{ query }}',
'{{ id }}',
'{{ account_id }}'
RETURNING
result,
success
;
# Description fields are for documentation purposes
- name: instances_search
props:
- name: id
value: "{{ id }}"
description: Required parameter for the instances_search resource.
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the instances_search resource.
- name: ai_search_options
value:
cache:
cache_threshold: "{{ cache_threshold }}"
enabled: {{ enabled }}
query_rewrite:
enabled: {{ enabled }}
model: "{{ model }}"
rewrite_prompt: "{{ rewrite_prompt }}"
reranking:
enabled: {{ enabled }}
match_threshold: {{ match_threshold }}
model: "{{ model }}"
retrieval:
boost_by:
- direction: "{{ direction }}"
field: "{{ field }}"
context_expansion: {{ context_expansion }}
filters: "{{ filters }}"
fusion_method: "{{ fusion_method }}"
keyword_match_mode: "{{ keyword_match_mode }}"
match_threshold: {{ match_threshold }}
max_num_results: {{ max_num_results }}
retrieval_type: "{{ retrieval_type }}"
return_on_failure: {{ return_on_failure }}
- name: messages
value:
- content: "{{ content }}"
role: "{{ role }}"
- name: query
value: "{{ query }}"
description: |
A simple text query string. Alternative to 'messages' — provide either this or 'messages', not both.