All Products
Search
Document Center

OpenSearch:Application schema in OpenSearch High-performance Search Edition

Last Updated:Apr 01, 2026

An application schema defines how your data is structured for indexing and search. When you upload data to OpenSearch, it is first stored in offline data tables. Each data table holds one or more fields. After processing, the tables are joined into an index table, which defines search attributes that the search engine uses to build indexes and return results.

If you use multiple data tables, specify the join fields before data processing begins.

How it works

Data source → Offline data tables → [Join on specified fields] → Index table → Search engine

Each field in a data table maps to an OpenSearch field type. The field type determines how data is indexed, how it can be queried, and which analysis methods apply.

Field types

OpenSearch High-performance Search Edition supports the following field types, grouped by purpose.

Full-text search

Use these types for fields that need tokenization and multiple analysis methods.

Field typeDescription
SHORT_TEXTShort text. Values must not exceed 100 bytes. Supports multiple analysis methods.
TEXTLong text. Supports multiple analysis methods.

Exact match

Use these types for fields queried by exact value — filtering, sorting, or joining on a precise string.

Field typeDescription
LITERALString constant. Supports exact match only.
LITERAL_ARRAYString constant array. Each element supports exact match only.

Numeric

Field typeDescription
INT64-bit integer.
INT_ARRAY64-bit integer array.
FLOATFloating-point number.
FLOAT_ARRAYFloating-point number array.
DOUBLEFloating-point number.
DOUBLE_ARRAYFloating-point number array.
If your data source fields are FLOAT or DOUBLE type, change them to DECIMAL to avoid data precision issues.

Temporal

Field typeDescription
TIMESTAMP64-bit unsigned integer representing a timestamp. Maps to DATETIME or TIMESTAMP in a data source. Values are automatically converted to milliseconds. Use the range function to filter results by time range.
Fields of the INT type can also be mapped to a DATETIME or TIMESTAMP field in a data source. The values are automatically converted to milliseconds. Use the range function to filter results by time range.

Geographic

Field typeDescription
GEO_POINTString constant representing a geographic coordinate in "Latitude value Longitude value" format.

Usage notes

Array types

Array field types (INT_ARRAY, FLOAT_ARRAY, DOUBLE_ARRAY, LITERAL_ARRAY) follow the same general pattern:

  • In a data source, map the field to a VARCHAR or STRING column. Use the MultiValueSpliter data processing plug-in to convert it.

  • When uploading via the OpenSearch API or SDKs, send the field as an array, not a string.

// Correct: array
String[] literal_array = {"Alibaba Cloud", "OpenSearch"};
For DOUBLE_ARRAY fields in ApsaraDB RDS and PolarDB data sources, only VARCHAR is supported (not STRING). For MaxCompute, both VARCHAR and STRING are supported.

Reserved field names

Warning

Do not use these names for your own fields. Using a reserved name causes data upload failures or unexpected behavior.

Reserved names: service_id, ops_app_name, inter_timestamp, index_name, pk, ops_version, ha_reserved_timestamp, summary

Field value limits

Each field type enforces value range limits. If a value falls outside the allowed range, an overflow error occurs or the value is truncated. For the full list, see the "Limits on fields" section of Limits.

Data source field type mappings

Use these tables to map fields from your data source to OpenSearch field types.

Supported field types by data source

Data sourceSupported field types
ApsaraDB RDSTINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, REAL, DOUBLE, NUMERIC, DECIMAL, TIME, DATE, TIMESTAMP, VARCHAR
PolarDBTINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, REAL, DOUBLE, NUMERIC, DECIMAL, TIME, DATE, TIMESTAMP, VARCHAR
MaxComputeBIGINT, DOUBLE, BOOLEAN, DATETIME, STRING, DECIMAL, MAP, ARRAY, TINYINT, SMALLINT, INT, FLOAT, CHAR, VARCHAR, DATE, TIMESTAMP, BINARY, INTERVAL_DAY_TIME, INTERVAL_YEAR_MONTH, STRUCT

Field type mapping reference

OpenSearch typeApsaraDB RDSPolarDBMaxCompute
INTBIGINT, TINYINT, SMALLINT, INTEGERBIGINT, TINYINT, SMALLINT, INTEGERBIGINT, TINYINT, SMALLINT, INT
INT_ARRAYVARCHAR, STRING (via MultiValueSpliter)VARCHAR, STRING (via MultiValueSpliter)VARCHAR, STRING (via MultiValueSpliter)
FLOATFLOAT, NUMERIC, DECIMALFLOAT, NUMERIC, DECIMALFLOAT, DECIMAL
FLOAT_ARRAYVARCHAR, STRING (via MultiValueSpliter)VARCHAR, STRING (via MultiValueSpliter)VARCHAR, STRING (via MultiValueSpliter)
DOUBLEDOUBLE, NUMERIC, DECIMALDOUBLE, NUMERIC, DECIMALDOUBLE, DECIMAL
DOUBLE_ARRAYVARCHAR (via MultiValueSpliter)VARCHAR (via MultiValueSpliter)VARCHAR, STRING (via MultiValueSpliter)
LITERALVARCHARVARCHARVARCHAR, STRING
LITERAL_ARRAYVARCHAR (via MultiValueSpliter)VARCHAR (via MultiValueSpliter)VARCHAR, STRING (via MultiValueSpliter)
SHORT_TEXTVARCHARVARCHARVARCHAR, STRING
TEXTVARCHARVARCHARVARCHAR, STRING
TIMESTAMPDATETIME, TIMESTAMPDATETIME, TIMESTAMPDATETIME, TIMESTAMP
GEO_POINTVARCHARVARCHARVARCHAR, STRING in "lon lat" format, where lon is longitude (range: [-180, 180]) and lat is latitude (range: [-90, 90]), both DOUBLE type, separated by a space

Create an application schema

OpenSearch supports four methods for creating an application schema. Choose based on where your data lives and how much manual control you need.

MethodWhen to use
Configure a data sourceYour data is in ApsaraDB RDS for MySQL, MaxCompute, or PolarDB for MySQL, and you want OpenSearch to infer the schema automatically. See Configure an ApsaraDB RDS for MySQL data source, Configure a MaxCompute data source, and Configure a PolarDB for MySQL data source.
Manually createYou want full control over field types, analysis methods, and index attributes.
Use a templateYou are migrating an existing application and want to reuse its schema. See Migrate an application schema between applications.
Upload a fileYou have a pre-defined schema file to import. See Create an application schema by uploading a file.