Go to file
weizijun e321fb024e
Fix template equals when mappings are wrapped (#77008)
When create template v2. mappings will add _doc. This will cause the created template to be inconsistent with the queried template.

In template class, add mappingsEquals method, to deal with this case.

reproduced:
MetadataIndexTemplateServiceTests.testAddComponentTemplate
when mappings are not null, the case will failed.

```
        Template template = new Template(
            Settings.builder().build(),
            new CompressedXContent("{\"properties\":{\"@timestamp\":{\"type\":\"date\"}}}"),
            ComponentTemplateTests.randomAliases()
        );
        ComponentTemplate componentTemplate = new ComponentTemplate(template, 1L, new HashMap<>());
```

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-09-03 14:22:56 -06:00
.ci Add 7.14.2 version. 2021-09-01 18:30:51 +02:00
.github Add GitHub action for synchronizing commits from master to main branch 2021-08-24 15:51:33 -07:00
.idea [ML] Adding new trained model allocation service (#75778) 2021-08-03 13:06:14 -04:00
benchmarks Remove Dead NamedWritableRegistry Fields in Aggs/Search Code (#76743) 2021-08-20 17:45:38 +02:00
build-conventions Avoid configuration time task creation (#76245) 2021-08-11 09:30:51 +02:00
build-tools Simplify test build output normalization (#77172) 2021-09-03 12:22:28 +02:00
build-tools-internal Update task names for rest compatiblity (#75267) 2021-09-03 11:26:11 -05:00
client Add enrich node cache (#76800) 2021-09-03 09:33:44 +02:00
dev-tools Improve atomic push script to support worktrees (#68873) 2021-02-11 10:13:15 -08:00
distribution Remove no-jdk distributions (#76896) 2021-08-25 09:52:15 -07:00
docs Move `index.hidden` from Static to Dynamic settings (#77218) 2021-09-03 09:15:52 -06:00
gradle/wrapper Update Gradle wrapper to 7.2 (#75894) 2021-08-18 05:11:28 -04:00
libs Anonymize AbstractRefCounted (#77208) 2021-09-03 07:59:44 +01:00
licenses Keep low level rest client under Apache 2 software license (#68694) 2021-02-08 11:13:31 -08:00
modules Fix TextFieldMapper Retaining a Reference to its Builder (#77251) 2021-09-03 18:44:11 +02:00
plugins Fix TextFieldMapper Retaining a Reference to its Builder (#77251) 2021-09-03 18:44:11 +02:00
qa Move die with dignity to be a test module (#77136) 2021-09-03 12:34:01 -04:00
rest-api-spec Update task names for rest compatiblity (#75267) 2021-09-03 11:26:11 -05:00
server Fix template equals when mappings are wrapped (#77008) 2021-09-03 14:22:56 -06:00
test Move die with dignity to be a test module (#77136) 2021-09-03 12:34:01 -04:00
x-pack Update task names for rest compatiblity (#75267) 2021-09-03 11:26:11 -05:00
.backportrc.json Add version constant for 7.16.0 2021-08-18 08:21:50 -07:00
.dir-locals.el Go back to 140 column limit in .dir-locals.el 2017-04-14 08:50:53 -06:00
.editorconfig Fix compiler warnings in :server - part 3 (#76024) 2021-08-10 15:05:55 +01:00
.git-blame-ignore-revs fix git blame after autoformtting (#77040) 2021-08-31 10:55:52 -04:00
.gitattributes Add a CHANGELOG file for release notes. (#29450) 2018-04-18 07:42:05 -07:00
.gitignore Move custom checkstyle rule implementations to build-conventions project (#74017) 2021-06-10 16:06:44 -07:00
BUILDING.md Document general gradle build guidelines (#76551) 2021-09-01 09:32:01 +02:00
CONTRIBUTING.md Document general gradle build guidelines (#76551) 2021-09-01 09:32:01 +02:00
LICENSE.txt Update sources with new SSPL+Elastic-2.0 license headers 2021-02-02 16:10:53 -08:00
NOTICE.txt Update sources with new SSPL+Elastic-2.0 license headers 2021-02-02 16:10:53 -08:00
README.asciidoc [DOCS] Refactor quick start guide and README (#71331) 2021-04-20 09:32:21 -04:00
TESTING.asciidoc [DOCS] Fix link (#73810) 2021-06-07 09:55:20 -04:00
Vagrantfile Introduce ES_JAVA_HOME (#68954) 2021-02-17 12:41:23 -05:00
build.gradle Enable bwc tests after backporting #76800 (#77235) 2021-09-03 11:56:59 +02:00
gradle.properties Fix Spotless failing with InvocationTargetException on JDK 16 (#73246) 2021-05-20 08:46:20 +02:00
gradlew Update Gradle wrapper to 7.2 (#75894) 2021-08-18 05:11:28 -04:00
gradlew.bat Update gradle wrapper to 6.6 (#59909) 2020-08-11 10:17:33 +02:00
settings.gradle Remove no-jdk distributions (#76896) 2021-08-25 09:52:15 -07:00

README.asciidoc

= Elasticsearch

Elasticsearch is the distributed, RESTful search and analytics engine at the
heart of the https://www.elastic.co/products[Elastic Stack]. You can use
Elasticsearch to store, search, and manage data for:

* Logs
* Metrics
* A search backend
* Application monitoring
* Endpoint security

\... and more!

To learn more about Elasticsearch's features and capabilities, see our
https://www.elastic.co/products/elasticsearch[product page].

[[get-started]]
== Get started

The simplest way to set up Elasticsearch is to create a managed deployment with
https://www.elastic.co/cloud/as-a-service[Elasticsearch Service on Elastic
Cloud].

If you prefer to install and manage Elasticsearch yourself, you can download
the latest version from 
https://www.elastic.co/downloads/elasticsearch[elastic.co/downloads/elasticsearch].

For more installation options, see the
https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html[Elasticsearch installation
documentation].

[[upgrade]]
== Upgrade

To upgrade from an earlier version of Elasticsearch, see the
https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html[Elasticsearch upgrade
documentation].

[[build-source]]
== Build from source

Elasticsearch uses https://gradle.org[Gradle] for its build system.

To build a distribution for your local OS and print its output location upon
completion, run:
----
./gradlew localDistro
----

To build a distribution for another platform, run the related command:
----
./gradlew :distribution:archives:linux-tar:assemble
./gradlew :distribution:archives:darwin-tar:assemble
./gradlew :distribution:archives:windows-zip:assemble
----

To build distributions for all supported platforms, run:
----
./gradlew assemble
----

Distributions are output to `distributions/archives`.

To run the test suite, see xref:TESTING.asciidoc[TESTING].

[[docs]]
== Documentation

For the complete Elasticsearch documentation visit
https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html[elastic.co].

For information about our documentation processes, see the
xref:docs/README.asciidoc[docs README].

[[contribute]]
== Contribute

For contribution guidelines, see xref:CONTRIBUTING.md[CONTRIBUTING]. 

[[questions]]
== Questions? Problems? Suggestions?

* To report a bug or request a feature, create a
https://github.com/elastic/elasticsearch/issues/new/choose[GitHub Issue]. Please
ensure someone else hasn't created an issue for the same topic.

* Need help using Elasticsearch? Reach out on the
https://discuss.elastic.co[Elastic Forum] or https://ela.st/slack[Slack]. A
fellow community member or Elastic engineer will be happy to help you out.