How to convert elastic search index schema into opensearch index schema

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

dependencies {
  implementation 'org.opensearch.client:opensearch-rest-client: 2.7.0'
  implementation 'org.opensearch.client:opensearch-java:2.4.0'
}

Describe the issue:
I create index in elastic search with schema without any issue.
Right now, we are planning to switching from elastic search to open search. The original schema json is not working anymore
{
“mappings”: {
“properties”: {
“key1”: {
“type”: “keyword”,
“fields”: {
“normalize”: {
“type”: “keyword”,
“normalizer”: “useLowercase”
}
}
},
“key2”: {
“type”: “keyword”,
“fields”: {
“normalize”: {
“type”: “keyword”,
“normalizer”: “useLowercase”
}
}
},
“create_ts”: {
“type”: “date”,
“fields”: {
“keyword”: {
“type”: “date”
}
}
}
}
}
}

The above json format is working in elastic search. Anyone know how to change it to open search format? Especially, how to create index with lower case normalizer field?
I could not find any useful document

Configuration:

Relevant Logs or Screenshots:

Hey @Evan

Only option I know of is to create template/index for static mapping and then roll it over. I went from Elasticsearch 7.10.x to Opensearch 1.3 without any issues. Just an idea.
.

can you give me an example with a little more details?
Or can you give me more detailed documents?

Hey @Evan

Here some documentation for mapping && templates I have used.

Here is the documentation ,If you just wanting to upgrade from ES 7.10 to OS 1.3

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.