indexes
Creates, updates, deletes, gets or lists an indexes resource.
Overview
| Name | indexes |
| Type | Resource |
| Id | aws.opensearch.indexes |
Fields
The following fields are returned by SELECT queries:
- get_index
| Name | Datatype | Description |
|---|---|---|
index_schema | object | The JSON schema of the index including mappings, settings, and semantic enrichment configuration. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_index | select | domain_name, index_name, region | Retrieves information about an OpenSearch index including its schema and semantic enrichment configuration. Use this operation to view the current index structure and semantic search settings. | |
create_index | insert | domain_name, region, IndexName, IndexSchema | Creates an OpenSearch index with optional automatic semantic enrichment for specified text fields. Automatic semantic enrichment enables semantic search capabilities without requiring machine learning expertise, improving search relevance by up to 20% by understanding search intent and contextual meaning beyond keyword matching. The semantic enrichment process has zero impact on search latency as sparse encodings are stored directly within the index during indexing. For more information, see Automatic semantic enrichment. | |
update_index | update | domain_name, index_name, region, IndexSchema | Updates an existing OpenSearch index schema and semantic enrichment configuration. This operation allows modification of field mappings and semantic search settings for text fields. Changes to semantic enrichment configuration will apply to newly ingested documents. | |
delete_index | delete | domain_name, index_name, region | Deletes an OpenSearch index. This operation permanently removes the index and cannot be undone. |
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 |
|---|---|---|
domain_name | string | |
index_name | string | The name of the index to delete. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_index
Retrieves information about an OpenSearch index including its schema and semantic enrichment configuration. Use this operation to view the current index structure and semantic search settings.
SELECT
index_schema
FROM aws.opensearch.indexes
WHERE domain_name = '{{ domain_name }}' -- required
AND index_name = '{{ index_name }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_index
- Manifest
Creates an OpenSearch index with optional automatic semantic enrichment for specified text fields. Automatic semantic enrichment enables semantic search capabilities without requiring machine learning expertise, improving search relevance by up to 20% by understanding search intent and contextual meaning beyond keyword matching. The semantic enrichment process has zero impact on search latency as sparse encodings are stored directly within the index during indexing. For more information, see Automatic semantic enrichment.
INSERT INTO aws.opensearch.indexes (
IndexName,
IndexSchema,
domain_name,
region
)
SELECT
'{{ IndexName }}' /* required */,
'{{ IndexSchema }}' /* required */,
'{{ domain_name }}',
'{{ region }}'
RETURNING
status
;
# Description fields are for documentation purposes
- name: indexes
props:
- name: domain_name
value: "{{ domain_name }}"
description: Required parameter for the indexes resource.
- name: region
value: "{{ region }}"
description: Required parameter for the indexes resource.
- name: IndexName
value: "{{ IndexName }}"
description: |
Name of OpenSearch index to be created/updated/retrieved/deleted for customer's domain
- name: IndexSchema
value: "{{ IndexSchema }}"
UPDATE examples
- update_index
Updates an existing OpenSearch index schema and semantic enrichment configuration. This operation allows modification of field mappings and semantic search settings for text fields. Changes to semantic enrichment configuration will apply to newly ingested documents.
UPDATE aws.opensearch.indexes
SET
IndexSchema = '{{ IndexSchema }}'
WHERE
domain_name = '{{ domain_name }}' --required
AND index_name = '{{ index_name }}' --required
AND region = '{{ region }}' --required
AND IndexSchema = '{{ IndexSchema }}' --required
RETURNING
status;
DELETE examples
- delete_index
Deletes an OpenSearch index. This operation permanently removes the index and cannot be undone.
DELETE FROM aws.opensearch.indexes
WHERE domain_name = '{{ domain_name }}' --required
AND index_name = '{{ index_name }}' --required
AND region = '{{ region }}' --required
;