Amazon OpenSearch Service

2025/11/17 - Amazon OpenSearch Service - 4 new api methods

Changes  This release adds index operation APIs to support Automatic Semantic Enrichment feature

CreateIndex (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.create_index(
    DomainName='string',
    IndexName='string',
    IndexSchema={...}|[...]|123|123.4|'string'|True|None
)
type DomainName:

string

param DomainName:

[REQUIRED]

The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.

type IndexName:

string

param IndexName:

[REQUIRED]

The name of the index to create. Must be between 1 and 255 characters and follow OpenSearch naming conventions.

type IndexSchema:

:ref:`document<document>`

param IndexSchema:

[REQUIRED]

The JSON schema defining index mappings, settings, and semantic enrichment configuration. The schema specifies which text fields should be automatically enriched for semantic search capabilities and includes OpenSearch index configuration parameters.

rtype:

dict

returns:

Response Syntax

{
    'Status': 'CREATED'|'UPDATED'|'DELETED'
}

Response Structure

  • (dict) --

    • Status (string) --

      The status of the index creation operation.

DeleteIndex (new) Link ¶

Deletes an OpenSearch index. This operation permanently removes the index and cannot be undone.

See also: AWS API Documentation

Request Syntax

client.delete_index(
    DomainName='string',
    IndexName='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.

type IndexName:

string

param IndexName:

[REQUIRED]

The name of the index to delete.

rtype:

dict

returns:

Response Syntax

{
    'Status': 'CREATED'|'UPDATED'|'DELETED'
}

Response Structure

  • (dict) --

    • Status (string) --

      The status of the index deletion operation.

UpdateIndex (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.update_index(
    DomainName='string',
    IndexName='string',
    IndexSchema={...}|[...]|123|123.4|'string'|True|None
)
type DomainName:

string

param DomainName:

[REQUIRED]

The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.

type IndexName:

string

param IndexName:

[REQUIRED]

The name of the index to update.

type IndexSchema:

:ref:`document<document>`

param IndexSchema:

[REQUIRED]

The updated JSON schema for the index including any changes to mappings, settings, and semantic enrichment configuration.

rtype:

dict

returns:

Response Syntax

{
    'Status': 'CREATED'|'UPDATED'|'DELETED'
}

Response Structure

  • (dict) --

    • Status (string) --

      The status of the index update operation.

GetIndex (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.get_index(
    DomainName='string',
    IndexName='string'
)
type DomainName:

string

param DomainName:

[REQUIRED]

The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.

type IndexName:

string

param IndexName:

[REQUIRED]

The name of the index to retrieve information about.

rtype:

dict

returns:

Response Syntax

{
    'IndexSchema': {...}|[...]|123|123.4|'string'|True|None
}

Response Structure

  • (dict) --

    • IndexSchema (:ref:`document<document>`) --

      The JSON schema of the index including mappings, settings, and semantic enrichment configuration.