Docs still refer to index types

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?

Even in Elasticsearch 6, there are types. It's just that it's bound to 1 type per index. See Removal of mapping types | Elasticsearch Guide [8.11] | Elastic or Removal of mapping types in Elasticsearch 6.0 | Elastic Blog for more about the current plan for type removal

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?

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.

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