Skip to content

Create Index

opensearchservice_create_index R Documentation

Creates an OpenSearch index with optional automatic semantic enrichment for specified text fields

Description

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.

Usage

opensearchservice_create_index(DomainName, IndexName, IndexSchema)

Arguments

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.

IndexName

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

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.

Value

A list with the following syntax:

list(
  Status = "CREATED"|"UPDATED"|"DELETED"
)

Request syntax

svc$create_index(
  DomainName = "string",
  IndexName = "string",
  IndexSchema = list()
)