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

[DOCS][101] Update first quick start with mappings examples #113558

Merged
merged 27 commits into from
Oct 2, 2024

Conversation

leemthompo
Copy link
Contributor

@leemthompo leemthompo commented Sep 25, 2024

📸URL PREVIEW

Originally envisioned this being standalone companion to basics page about indices, documents, mappings but we discussed that might actually fit right into the first quick start?

My only concern is this is a little long now 🤔

TODO:

  • Align on titles for these and heading abbreviations etc.

Copy link
Contributor

Documentation preview:

@leemthompo leemthompo changed the title [DOCS] Update first quick start with mappings examples [DOCS][101] Update first quick start with mappings examples Sep 25, 2024
Added my-explicit-mappings-books to TESTSETUP and TEARDOWN.
Skipped the initial PUT /books test as the index is already set up.
Modified the GET /_cat/indices command to include specific parameters.
Changed a PUT request to POST for adding a document.
Updated the description of the dynamically added field's data type from keyword to text.
Made minor wording adjustments throughout the document.
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
++++
<titleabbrev>Basics: Add data using APIs</titleabbrev>
<titleabbrev>Basics: Indices, documents, and mappings</titleabbrev>
++++

In this quick start guide, you'll learn how to do the following tasks:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quickstart articles like this should still have an introductory paragraph. Introductory paragraphs can help search engines when searching for content.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Roger that!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the intro paragraph will be prose version of the "in this quick start you'll learn how to do x,y,z" list, wonder if should remove that list entirely and let the "On this page" serve that porpoise 🐬

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add intro in 31d8006

docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
Copy link
Contributor

@shainaraskas shainaraskas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

provided mostly tutorial style and depth comments inline. regarding your question on direction: I like the idea of a quick "index a doc and see a result" type tutorial to get people familiar with playing with the API, but I wonder if, in a better IA world, this would be a top-level tutorial in an index series, that we could just link to prominently. the thought in the back of my mind is: we need tutorials in the index content, so what would go there, if not this style of tutorial?

given that we don't live in said world, I'm cool with this getting published

docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
- Updated title and titleabbrev to focus on indexing and searching using APIs
- Added links
- Clarified explanation about code examples and language conversion
- Added numbered steps (1-5)
- Added example responses
- Included more detailed explanations with numbered annotations in code snippets
- Added tip about other ways to add data to Elasticsearch
- Added more context and explanations for search operations
@leemthompo
Copy link
Contributor Author

Thanks @shainaraskas. Not pinging you on a holiday day. :)

I've made updates in 3a3a9a4. See commit message for summary.

Indexed documents are available for search in near real-time.
Explicit mappings are defined at index creation, and documents must conform to these mappings.
When an index has the `dynamic` flag set to `true`, you can add new fields to documents without updating the mapping.
This allows you to <<mapping-combine-explicit-dynamic,combine explicit and dynamic mappings>>.
Copy link
Contributor Author

@leemthompo leemthompo Sep 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new section added to main mappings page in c0eba9f

@leemthompo
Copy link
Contributor Author

🤔 Because we're doing a lot of explanation here, with response annotations and links to every concept/API call, we're already in tutorial rather than quick start territory. Perhaps tutorials is a better umbrella. These are a lot more pedagogical than "copy these few commands and be on your way".

@leemthompo leemthompo marked this pull request as ready for review October 1, 2024 11:45
@leemthompo leemthompo added auto-backport-and-merge v8.16.0 v8.15.0 >docs General docs changes Team:Docs Meta label for docs team labels Oct 1, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@leemthompo
Copy link
Contributor Author

@elasticmachine update branch

docs/reference/mapping.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
docs/reference/quickstart/getting-started.asciidoc Outdated Show resolved Hide resolved
Copy link
Member

@kderusso kderusso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some clarifications on mapping behavior that we should probably address.

docs/reference/mapping.asciidoc Outdated Show resolved Hide resolved
docs/reference/mapping.asciidoc Outdated Show resolved Hide resolved
docs/reference/mapping.asciidoc Show resolved Hide resolved
@@ -344,7 +350,8 @@ GET /books/_mapping
[[getting-started-explicit-mapping]]
==== Define explicit mapping

Create an index named `my-explicit-mappings-books` with explicit mappings:
Create an index named `my-explicit-mappings-books` with explicit mappings.
Pass each field's properties as a JSON object. This object should contain the field type and any additional <<mapping-params,mapping parameters>>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 do we want a link to available types here?

Copy link
Contributor

@shainaraskas shainaraskas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving - I do see the brave new world issue as possibly blocking, but if you fix that you're good to go imo

@leemthompo
Copy link
Contributor Author

given that we don't live in said world, I'm cool with this getting published

that will be a Brave New World

@leemthompo leemthompo merged commit c85c2d9 into elastic:main Oct 2, 2024
5 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

The backport operation could not be completed due to the following error:

An unexpected error occurred when attempting to backport this PR.

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 113558

@leemthompo
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x
8.15

Questions ?

Please refer to the Backport tool documentation

gmarouli pushed a commit to gmarouli/elasticsearch that referenced this pull request Oct 3, 2024
elasticsearchmachine pushed a commit that referenced this pull request Oct 3, 2024
…113558) (#113973)

* [DOCS][101] Update first quick start with mappings examples (#113558)

(cherry picked from commit c85c2d9)

* Fix broken link
matthewabbott pushed a commit to matthewabbott/elasticsearch that referenced this pull request Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants