Docs still refer to index types


#1

https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html

This has the index type in the mapping block. Isn't this obsolete now that ES removes index types? How do we do it now that there are no types?


(Shane Connelly) #2

Even in Elasticsearch 6, there are types. It's just that it's bound to 1 type per index. See https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html or https://www.elastic.co/blog/removal-of-mapping-types-elasticsearch for more about the current plan for type removal


#3

So is doc just the conventional name given to a generic type? Anywhere I see doc it is referring to the index type and would he replaced with tweet if that were the type instead?


(Shane Connelly) #4

There is no single / conventional name in our docs given to types. doc is used a few places, but the documentation page you linked uses type1 as the type as a counterexample. tweet is used elsewhere in the docs as a type in some examples (e.g. https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html). I don't think it's safe to assume that anywhere you see doc it's a type, but it's likely the case in many places.

Also, FYI, since you asked "isn't this documentation obsolete" it's worth mentioning that any of the documentation which has these "copy as curl" / "view in console" links on it is actually tested to make sure it's accurate when we build Elasticsearch to ensure there we don't have drift / obsolete documentation.


(system) #5

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