Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type inconsistencies in 6.x docs examples #44670

Closed
cjcenizal opened this issue Jul 21, 2019 · 5 comments
Closed

Fix type inconsistencies in 6.x docs examples #44670

cjcenizal opened this issue Jul 21, 2019 · 5 comments
Assignees
Labels
>docs General docs changes :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch

Comments

@cjcenizal
Copy link
Contributor

For example, the Index Templates 6.0 docs have an example that suggests using a type:

PUT _template/template_1
{
  "index_patterns": ["te*", "bar*"],
  "settings": {
    "number_of_shards": 1
  },
  "mappings": {
    "type1": {
      "_source": {
        "enabled": false
      },
      "properties": {
        "host_name": {
          "type": "keyword"
        },
        "created_at": {
          "type": "date",
          "format": "EEE MMM dd HH:mm:ss Z YYYY"
        }
      }
    }
  }
}

However, the Index Templates 6.5 docs suggest using the _doc type.

PUT _template/template_1
{
  "index_patterns": ["te*", "bar*"],
  "settings": {
    "number_of_shards": 1
  },
  "mappings": {
    "_doc": {
      "_source": {
        "enabled": false
      },
      "properties": {
        "host_name": {
          "type": "keyword"
        },
        "created_at": {
          "type": "date",
          "format": "EEE MMM dd HH:mm:ss Z YYYY"
        }
      }
    }
  }
}

I suggest we reconcile these types of inconsistencies throughout 6.x so that users have an easier time understanding and accommodating the types deprecation change.

@cjcenizal cjcenizal added the >docs General docs changes label Jul 21, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs

@DaveCTurner
Copy link
Contributor

Thanks @cjcenizal, I think the particular discrepancy you highlight is somewhat deliberate, because _doc wasn't a legal type name until #27816 (i.e. 6.2.0), so we can't use _doc in the 6.0 reference documentation. That PR adjusts quite a lot of the docs, and there were a few followup PRs to deal with things it missed which did not all get backported all the way to 6.2. The case you highlight was fixed in #29667 (i.e. 6.4.0). Would you be interested in back porting that to 6.3 and 6.2?

As a user, the best bet is to upgrade to 6.8 (which is compatible with earlier 6.x releases) and then use the 6.8 docs.

@DaveCTurner DaveCTurner added the :Search Foundations/Mapping Index mappings, including merging and defining field types label Jul 23, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@cbuescher
Copy link
Member

+1 to what @DaveCTurner said. Using "_doc" as the "dummy" type in later 6.x documentation is necessary, but at the same time we cannot use it going backwards. I understand the irritation but the docs are in sync with what each of the minor versions requires in this case I think.
@cjcenizal does this explanation make sense to you and would you mind if we close this issue?

@cjcenizal cjcenizal self-assigned this Aug 5, 2019
@cjcenizal
Copy link
Contributor Author

@cbuescher Yes, this makes sense. Thanks for the explanation. I'll close this issue and backport #29667 to 6.3 and 6.2 per @DaveCTurner's request.

@javanna javanna added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch
Projects
None yet
Development

No branches or pull requests

5 participants