Skip to content

Create Index

opensearchserviceserverless_create_index R Documentation

Creates an index within an OpenSearch Serverless collection

Description

Creates an index within an OpenSearch Serverless collection. Unlike other OpenSearch indexes, indexes created by this API are automatically configured to conduct automatic semantic enrichment ingestion and search. For more information, see About automatic semantic enrichment in the OpenSearch User Guide.

Usage

opensearchserviceserverless_create_index(id, indexName, indexSchema)

Arguments

id

[required] The unique identifier of the collection in which to create the index.

indexName

[required] The name of the index to create. Index names must be lowercase and can't begin with underscores (_) or hyphens (-).

indexSchema

The JSON schema definition for the index, including field mappings and settings.

Value

An empty list.

Request syntax

svc$create_index(
  id = "string",
  indexName = "string",
  indexSchema = list()
)