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

Improve top-level docs on mapping field types. #57548

Closed
jtibshirani opened this issue Jun 2, 2020 · 8 comments
Closed

Improve top-level docs on mapping field types. #57548

jtibshirani opened this issue Jun 2, 2020 · 8 comments
Labels
>docs General docs changes :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Docs Meta label for docs team Team:Search Meta label for search team

Comments

@jtibshirani
Copy link
Contributor

jtibshirani commented Jun 2, 2020

As we’ve added more field types, the list of mapping types has grown quite long. For users, the list of options can be a bit overwhelming and hard to navigate.

To help address this, we could reorganize the reference on field types:

  • Instead of the sections 'core', 'complex', and 'specialized', they could be grouped more by use case. For example there would be a 'full-text search' section that contains text, completion, and search_as_you_type, etc.
  • We could add a 'how to' page on choosing the right mappings. The assumption is that the user has already played around with Elasticsearch with all data mapped dynamically, and now wants to design the right schema.

Other suggestions are very welcome!

@jtibshirani jtibshirani added >docs General docs changes :Search Foundations/Mapping Index mappings, including merging and defining field types labels Jun 2, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Mapping)

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jun 2, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs (>docs)

@jtibshirani
Copy link
Contributor Author

jtibshirani commented Jun 24, 2020

A couple other ideas:

  • Now that we added the notion of a 'field type family' in Collapse field types into "families" of field types in _field_caps. #53175, it would be good to surface these families in the docs. For now, keyword, constant_keyword, and wildcard could be grouped together. We can explain that these field types are guaranteed to support the same functionality, but give different trade-offs in terms of performance.
  • In the overview page, we could indicate which field types are OSS vs. licensed (?)

@markharwood
Copy link
Contributor

it would be good to surface these families in the docs

I added a short comment in the field caps docs but I imagine it could be expanded on.

@jrodewig
Copy link
Contributor

jrodewig commented Aug 14, 2020

I've been working on this in #61117 and stumbled across this reference in the Beats dev guide:

metricbeat/module/{module}/{metricset}/_meta/fields.yml: Contains all fields definitions retrieved by the metricset. As field types, each field must have a core data type supported by elasticsearch. Here’s a very basic example that shows one group from the MySQL status metricset:

https://www.elastic.co/guide/en/beats/devguide/current/metricset-details.html#_fields_yml

I don't think core types has/had any formal or technical meaning. It seems like it just started as a way to group "primitive" data types. However, I've also heard there are some field types that aren't supported by Metricbeat, such as histogram. Removing the core listing could break those docs and make it difficult for users to know what types are supported.

@jtibshirani @dedemorton What are your thoughts? I like the idea of better organizing these types around family/use case. However, that may mean maintaining a list of unsupported field types in the Metricbeat docs.

@jtibshirani
Copy link
Contributor Author

I don't think core types has/had any formal or technical meaning... However, that may mean maintaining a list of unsupported field types in the Metricbeat docs.

Depending on the new grouping, it could make sense to retain a section for 'core' data types. But I agree that 'core' is not meant to be an official concept, and we regularly add (and may remove) field types from this section. It feels more robust for Metricbeat to not rely on this section and instead explain what field types are supported/ unsupported.

@jrodewig
Copy link
Contributor

It feels more robust for Metricbeat to not rely on this section and instead explain what field types are supported/ unsupported.

Opened elastic/beats#20671 to capture this.

@jrodewig jrodewig removed their assignment Aug 24, 2020
@jtibshirani
Copy link
Contributor Author

I'm going to close now that @jrodewig merged #53175 to reorganize the field types and define type families. We also opened #61441 to track combining all the types in the keyword family into the same page.

It'd be great to provide more guidance on choosing the right mappings (through a 'how to' page, visual guide, or even a 'mappings suggestion API'?), but we can plan to address that separately.

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:Docs Meta label for docs team Team:Search Meta label for search team
Projects
None yet
Development

No branches or pull requests

4 participants