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

Replace usages of _source.mode in documentation #114743

Merged

Conversation

salvatore-campagna
Copy link
Contributor

@salvatore-campagna salvatore-campagna commented Oct 14, 2024

We will deprecate the _source.mode mapping level configuration
in favor of the index-level index.mapping.source.mode setting.
As a result, we go through the documentation and update it to reflect
the introduction of the setting.

Copy link
Contributor

Documentation preview:

@salvatore-campagna salvatore-campagna marked this pull request as ready for review October 14, 2024 16:36
@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v9.0.0 labels Oct 14, 2024
@salvatore-campagna salvatore-campagna self-assigned this Oct 14, 2024
@salvatore-campagna salvatore-campagna added >docs General docs changes :StorageEngine/Logs You know, for Logs and removed needs:triage Requires assignment of a team area label labels Oct 14, 2024
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

Doc wise LGTM 👍 Left one question about the test failure.

"mappings": {
"_source": { "mode": "synthetic" },
Copy link
Member

Choose a reason for hiding this comment

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

I don't fully understand why this failures happens for flattened field doc tests: https://buildkite.com/elastic/elasticsearch-pull-request/builds/36289#01928be4-ffbb-4def-8006-256e92e1e5d5/6-13640

foo is returned in an extra array. Strange that this failure happens with a doc change.

@leemthompo
Copy link
Contributor

leemthompo commented Oct 15, 2024

docscheck error:

 1> [2024-10-14T13:49:30,191][ERROR][o.e.s.DocsClientYamlTestSuiteIT] [test] This failing test was generated by documentation starting at reference/mapping/types/date_nanos.asciidoc:synthetic-source-date-nanos-example. It may include many snippets. See docs/README.asciidoc for an explanation of test generation.
2024-10-14 18:58:01 CEST	  2> REPRODUCE WITH: ./gradlew ":docs:yamlRestTest" --tests "org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT.test {yaml=reference/mapping/types/date_nanos/synthetic-source-date-nanos-example}" -Dtests.seed=F66B1F7F3663ED29 -Dtests.locale=en-SE -Dtests.timezone=America/Punta_Arenas -Druntime.java=22
2024-10-14 18:58:01 CEST	  2> java.lang.AssertionError: Failure at [reference/mapping/types/date_nanos:156]: Expected a map containing
2024-10-14 18:58:01 CEST	    _source: a map containing
2024-10-14 18:58:01 CEST	         date: a list containing
2024-10-14 18:58:01 CEST	              0: expected "2014-01-01T12:10:30.000Z" but was "2015-01-01T12:10:30.000Z"
2024-10-14 18:58:01 CEST	              1: expected "2015-01-01T12:10:30.000Z" but was "2014-01-01T12:10:30.000Z"

just looks like these two dates have swapped places :)

@salvatore-campagna
Copy link
Contributor Author

@elasticmachine update branch

@salvatore-campagna
Copy link
Contributor Author

@lkts I left out binary.asciidoc because that uses

public static final TypeParser PARSER = new TypeParser(
        (n, c) -> new Builder(n, c.getIndexSettings().getMode().isSyntheticSourceEnabled())
    );

which ignores the setting.

@salvatore-campagna salvatore-campagna merged commit f6a1e36 into elastic:main Oct 16, 2024
5 checks passed
javanna pushed a commit to javanna/elasticsearch that referenced this pull request Oct 16, 2024
We will deprecate the `_source.mode` mapping level configuration
in favor of the index-level `index.mapping.source.mode` setting.
As a result, we go through the documentation and update it to reflect
the introduction of the setting.
salvatore-campagna added a commit to salvatore-campagna/elasticsearch that referenced this pull request Oct 16, 2024
We will deprecate the `_source.mode` mapping level configuration
in favor of the index-level `index.mapping.source.mode` setting.
As a result, we go through the documentation and update it to reflect
the introduction of the setting.

(cherry picked from commit f6a1e36)
@salvatore-campagna
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Questions ?

Please refer to the Backport tool documentation

salvatore-campagna added a commit that referenced this pull request Oct 16, 2024
We will deprecate the `_source.mode` mapping level configuration
in favor of the index-level `index.mapping.source.mode` setting.
As a result, we go through the documentation and update it to reflect
the introduction of the setting.

(cherry picked from commit f6a1e36)
georgewallace pushed a commit to georgewallace/elasticsearch that referenced this pull request Oct 25, 2024
We will deprecate the `_source.mode` mapping level configuration
in favor of the index-level `index.mapping.source.mode` setting.
As a result, we go through the documentation and update it to reflect
the introduction of the setting.
jfreden pushed a commit to jfreden/elasticsearch that referenced this pull request Nov 4, 2024
We will deprecate the `_source.mode` mapping level configuration
in favor of the index-level `index.mapping.source.mode` setting.
As a result, we go through the documentation and update it to reflect
the introduction of the setting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :StorageEngine/Logs You know, for Logs Team:Docs Meta label for docs team Team:StorageEngine v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants