Mapping types _type or type or both

Is type, as used below, being removed from elasticsearch?

PUT _template/dogpound_mpds
{
"index_patterns": ["dogpound_mpds*"],
"mappings" : {
    "_doc" : {
        "dynamic": "true",
        "properties": {
          "twitter": {"type": "text","fields": {"keyword": {"type": "keyword","ignore_above": 256}}},
          "cowboy": {"type": "text","fields": {"keyword": {"type": "keyword","ignore_above": 256}}},
          "start": {"type": "date"}
          "duration": {"type": "integer"}
        }
    }
},
"aliases": {
    "dogpound_mpds": {}
}
}

Your formatting is not the best, can you wrap the code in markdown style backticks?

like that?

Great, thanks!

The mapping type is not going anywhere.
The _doc type above is what is changing.

I am trying to prepare for the removal of mapping types.

https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html

I thought by using "_doc" I was headed in the right direction?

Can you explain?

don't forget about me?

You are.
By only having one _type, that is _doc, when we remove _types completely you are already prepared.

What do you mean?

I am concerned that now I will have trouble with "_doc". I think I still have a fundamental misunderstanding about what it means to have mapping types removed. Your initial response seems to indicate I will have problems because something is changing with "_doc"?

still with me?

Read this and specifically the "Also be patient" part.

It's fine to answer on your own thread after 2 or 3 days (not including weekends) if you don't have an answer.

In that example you gave you have two "types";

  1. the type referring to the mapping of a specific field. This is not changing
  2. the _type referring to the mapping of a document variant

The second one is changing.

What do you mean?

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