Skip to content

[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

Merged
merged 3 commits into from
Jul 8, 2019
Merged

[DOCS] Clarify array is not a field datatype #43931

merged 3 commits into from
Jul 8, 2019

Conversation

jrodewig
Copy link
Contributor

@jrodewig jrodewig commented Jul 3, 2019

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

  • Retitles Array datatype page to Array handling
  • Moves the Array handling page to the bottom of the Field datatypes nav
  • Adds a new Array handling section to the Field datatypes page.
  • Add an anchor to Multi-value fields and the inverted index aside of the Array handling page

Screenshots

Array handling title Array handling title
Array handling section Array handling section
Field datatypes nav Field datatypes nav

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-docs

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@jpountz jpountz removed the v7.3.0 label Jul 3, 2019
Copy link
Contributor

@jtibshirani jtibshirani left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

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[]
Copy link
Contributor

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!)

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

@jrodewig jrodewig Jul 8, 2019

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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@jrodewig
Copy link
Contributor Author

jrodewig commented Jul 8, 2019

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!

@jrodewig jrodewig merged commit f339df5 into elastic:master Jul 8, 2019
@jrodewig jrodewig deleted the clarify-array-type branch July 8, 2019 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify datatypes array and text on docs
5 participants