-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[DOCS] Clarify array is not a field datatype #43931
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
Conversation
Pinging @elastic/es-docs |
Pinging @elastic/es-search |
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 change looks like a nice improvement overall! I left a couple comments + questions.
@@ -56,6 +54,12 @@ string:: <<text,`text`>> and <<keyword,`keyword`>> | |||
|
|||
<<flattened>>:: Allows an entire JSON object to be indexed as a single field. | |||
|
|||
[float] | |||
[[types-array-handling]] | |||
=== Array handling |
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.
Super small comment, maybe Arrays
would read more naturally, especially given the Multi-fields
title below?
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.
Thanks. I agree this would be more consistent.
Changed with e8f6d42.
@@ -118,3 +120,5 @@ include::types/dense-vector.asciidoc[] | |||
include::types/sparse-vector.asciidoc[] | |||
|
|||
include::types/search-as-you-type.asciidoc[] | |||
|
|||
include::types/array.asciidoc[] |
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 think we've been trying to keep these nav items alphabetized (although we haven't always succeeded!)
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.
My reasoning here was that since an array was not a datatype, moving it out of the standard order might indicate that.
However, I don't think it's a huge deal either way. Moved it back to alphabetical order with e8f6d42
@@ -1,9 +1,9 @@ | |||
[[array]] | |||
=== Array datatype | |||
=== Array handling |
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.
Same small comment, maybe Arrays
would read slightly better?
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.
Changed with e8f6d42.
@@ -78,6 +78,11 @@ to help make a decision. | |||
|`half_float`|+2^-24^+ |+65504+ |+11+ / +3.31+ | |||
|======================================================================= | |||
|
|||
[[number-array]] | |||
==== Array handling for numeric fields |
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'm not sure it makes sense to add references about array handling to just these two pages (numeric
and text
), because it could imply that other field types cannot be arrays. It is also fairly arbitrary to include notes on these two pages -- it is common to use arrays for many other types like keyword
, date
, or ip
. I'm curious as to your opinions here.
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 added notes to text
and numeric
based on the description of this issue: 43892.
However, if arrays are commonly used with many datatypes, it might make most sense to not include these notes at all. I'm not very familiar with the usage trend so I'll defer to you.
In the meantime, I removed these notes with e8f6d42.
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.
Thanks, I think the change looks good with these notes omitted.
Thanks for your review and feedback @jtibshirani. I've left responses to particular comments and pushed some changes with e8f6d42. Please let me know your thoughts. Thanks! |
Based on its page title, it's possible that users can assume arrays are a dedicated field datatype. These changes make it clearer that Elasticsearch supports array handling, but that arrays are not a datatype.
Resolves #43892.
Changes
Screenshots
Array handling title
Array handling section
Field datatypes nav