this is my index default mapping
> {
> "yoyo4y" : {
> "mappings" : {
> "doc" : {
> "properties" : {
> "@timestamp" : {
> "type" : "date"
> },
> "@version" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "after" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "op" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "patch" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "source" : {
> "properties" : {
> "connector" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "h" : {
> "type" : "long"
> },
> "initsync" : {
> "type" : "boolean"
> },
> "name" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "ns" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "ord" : {
> "type" : "long"
> },
> "rs" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "sec" : {
> "type" : "long"
> },
> "version" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> }
> }
> },
> "ts_ms" : {
> "type" : "long"
> }
> }
> }
> }
> }
> }
and this is a mapping based on the first one, i want to define to a empty index
> PUT firstindex/_mapping/
> {
> "mappings" : {
>
> "doc" : {
>
> "properties" : {
> "@timestamp" : {
> "type" : "date"
> },
> "@version" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "after": {
>
> "properties": {
> "_id": {
> "properties": {
> "$oid" : { "type": "text" },
> "name" : { "type": "text" },
> "number": { "type": "int" },
> "season": { "type": "text" }
> },
> "op" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "patch" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "source" : {
> "properties" : {
> "connector" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "h" : {
> "type" : "long"
> },
> "initsync" : {
> "type" : "boolean"
> },
> "name" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "ns" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "ord" : {
> "type" : "long"
> },
> "rs" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> },
> "sec" : {
> "type" : "long"
> },
> "version" : {
> "type" : "text",
> "fields" : {
> "keyword" : {
> "type" : "keyword",
> "ignore_above" : 256
> }
> }
> }
> }
> },
> "ts_ms" : {
> "type" : "long"
> }
> }
> }
> }
> }
> }
> }
> }}}