Getting and Error "Caanot assign multiple type to one index"

Hi Experts,

I am aware that multiple type cannot be assigned in ES6.x index. I have a CSV file and using LS I am parsing it . My ES6.x template is like below

PUT _template/test
{
  "index_patterns": ["test*"],
  "settings": {
    "number_of_shards": 1
  },
  "mappings": {
"doc": {   
      "properties": {
        "managerReceiptTime": {
          "type": "date",
          "format": "dd MMM YYYY HH:mm:ss 'IST'"
        }
      }
    }
  }
}

Error

"error"=>{"type"=>"illegal_argument_exception", "reason"=>"Rejecting mapping update to [test-2018.18chep] as the final mapping would have more than 1 type: [doc, logs]"}

Mapping cannot go without a type (doc) , can someone suggest how i can resolve this issue ? I have checked blogs and posts by ES like breaking changes but this does not help.

Regards
VG

Well , I resolved the issue , since multitypes are deprecated in ES 6.x so i need to define only one type in the Template and same in the LS output filter . Problem resolved once I mentioned below in LS output filter , hope this will help someone.

LS Output filter

document_type => "test"

ES Template

{
  "index_patterns": ["cef*"],
  "settings": {
    "number_of_shards": 1
  },
  "mappings": {
"test": {   
      "properties": {
        "managerReceiptTime": {
          "type": "date",
          "format": "dd MMM YYYY HH:mm:ss 'IST'"
        }
      }
    }
  }
}

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