All Products
Search
Document Center

OpenSearch:Create an application schema by uploading a file

Last Updated:Apr 11, 2025

Create a file

Configure field names and field types for the application schema in a file. You can customize values as long as they can represent field types.

 {
  "table_name": {
   "int": 1,
   "int_array": [
    1,
    2,
    3,
    4
   ],
   "float": 12.5,
   "float_array": [
    12.1,
    12.2,
    12.3
   ],
   "double": 12.6,
   "double_array": [
    12.1,
    12.2,
    12.3
   ],
   "literal": "LITERAL type",
   "literal_array": [
    "OpenSearch",
    "Open",
    "Search"
   ],
   "short_text": "SHORT_TEXT type",
   "text": "TEXT type",
   "timestamp": 1624502392077,
   "geo_point": "12 15"
  }
 }

Upload the file

Select Use File. In the panel that appears, upload the file you configured in the previous step.

1

Adjust fields

image

As shown in the preceding figure, the system may establish incorrect mappings between the field names framed in red and their field types because the types of the fields are not distinguishable by field value. In this case, you need to adjust the types of the fields based on your business requirements after you upload the file.