-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
[DOCS] Reorg field data types page #61117
Conversation
Pinging @elastic/es-search (:Search/Mapping) |
Pinging @elastic/es-docs (>docs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a nice start! I left a couple preliminary comments.
The following sections organize the available field types based on their | ||
intended use. Except where noted, the type family is the same as the field type. | ||
|
||
<<binary,`binary`>>:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me this organization is a bit unclear. Some types like binary
and boolean
don't belong to an overall section. And the sections don't relate to a consistent concept -- some describe use cases like 'full text search' while others are broad type categories like 'dates'.
It's actually quite challenging to come up with a good grouping! I'll reach out to you through another channel with a brainstorming document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks!
@jtibshirani @markharwood @giladgal I updated the categorization of the data types based on feedback from the other channel. Please take a look at the preview and leave any additional feedback you have. All feedback welcome! |
|
||
<<binary>>:: `binary` | ||
<<boolean>>:: `boolean` | ||
keyword:: <<keyword,`keyword`>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is out of scope for the current PR, but seeing this made me think that each 'field type family' should live on a single sub-page. We could have a short description of the family at the top, and then a subsection for each type. This would help users directly compare the different options, and could make wildcard
more discoverable.
@jrodewig @markharwood what would you think about this idea as a potential follow-up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I like this idea. I've created #61441 to track.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I understand if you'd like to wait to merge to give others some time to weigh in though.
[[object-types]] | ||
==== Objects and relational types | ||
|
||
<<object,`object`>>:: A single JSON object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that the existing description of object + nested is quite confusing. Suggested update:
- object: A JSON object.
- nested: A JSON object that preserves the relationship between its subfields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much clearer. Thanks for the suggestion.
Thank you so much for your reviews and the work on this reorg @jtibshirani. You did most of the heavy lifting!🙇 I'll leave this PR open for a few more days to get any additional feedback. |
I wonder if "quantifiers" might be a useful word to help describe the purpose of our numerics? A JSON long shouldn't be mapped as an elasticsearch
... all quantities of something. |
I've added this to the I think relabelling "Numbers" as "Quantifiers" entirely may simply obfuscate things rather than help users trying to map IDs. I think that topic has a bit more nuance than can probably be captured here (e.g., "Do you need to do math on these IDs?", "Do you need to search the IDs based on a range?", "Do you frequently sort or filter on this ID?", etc.). |
Agreed, it's not always 100% clear-cut but generally range queries, sorting and math apply to amounts more than unique IDs. Exceptions might be IDs like order numbers that increment.
That sounds a little like "quantifiers" and "numeric types" are two different things. How about
|
Thanks for the suggestion @markharwood! I've added a slightly modified version to the docs. |
Keyword:: The keyword family, including <<keyword, `keyword`>>, | ||
<<constant-keyword,`constant_keyword`>>, and | ||
<<wildcard, `wildcard`>>. | ||
<<number,Numbers>>:: Numeric types, such as `long` and `double`, used to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for nitpicking -- the 'amounts' part is really helpful, but the 'rather than IDs' part feels confusing, and as @markharwood mentioned there are actually some use cases for mapping ordered IDs as numbers. We could remove 'rather than IDs' (since we already have a warning/ tip about it in the numeric types docs)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem. Removed with c4beb42. Thanks for raising.
@elasticmachine update branch |
Went ahead and merged this in. Please feel free to reach out if you have any further iteration. Thanks! |
Reorganizes the field data types page based on use case.
Also incorporates type families and standardizes usage.
Relates to #57548
Preview
https://elasticsearch_61117.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/mapping-types.html