diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy index 34dde6e5dad..83dd1b7e4c5 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy @@ -418,8 +418,7 @@ class ClusterFormationTasks { // argument are wrapped in an ExecArgWrapper that escapes commas args execArgs.collect { a -> new EscapeCommaWrapper(arg: a) } } else { - executable 'sh' - args execArgs + commandLine execArgs } } } diff --git a/core/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java b/core/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java index 37a89531184..925940a3903 100644 --- a/core/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java +++ b/core/src/main/java/org/elasticsearch/bootstrap/BootstrapCheck.java @@ -335,7 +335,7 @@ final class BootstrapCheck { @Override public String errorMessage() { return "please set [" + ElectMasterService.DISCOVERY_ZEN_MINIMUM_MASTER_NODES_SETTING.getKey() + - "] to a majority of the number of master eligible nodes in your cluster."; + "] to a majority of the number of master eligible nodes in your cluster"; } @Override diff --git a/core/src/main/java/org/elasticsearch/index/analysis/FingerprintAnalyzer.java b/core/src/main/java/org/elasticsearch/index/analysis/FingerprintAnalyzer.java index 66fdbeaeb39..f7bf44256cc 100644 --- a/core/src/main/java/org/elasticsearch/index/analysis/FingerprintAnalyzer.java +++ b/core/src/main/java/org/elasticsearch/index/analysis/FingerprintAnalyzer.java @@ -48,9 +48,9 @@ public final class FingerprintAnalyzer extends Analyzer { final Tokenizer tokenizer = new StandardTokenizer(); TokenStream stream = tokenizer; stream = new LowerCaseFilter(stream); + stream = new ASCIIFoldingFilter(stream, preserveOriginal); stream = new StopFilter(stream, stopWords); stream = new FingerprintFilter(stream, maxOutputSize, separator); - stream = new ASCIIFoldingFilter(stream, preserveOriginal); return new TokenStreamComponents(tokenizer, stream); } } diff --git a/core/src/test/java/org/elasticsearch/index/analysis/FingerprintAnalyzerTests.java b/core/src/test/java/org/elasticsearch/index/analysis/FingerprintAnalyzerTests.java index 0e4ed8f4fb7..8c1d530e448 100644 --- a/core/src/test/java/org/elasticsearch/index/analysis/FingerprintAnalyzerTests.java +++ b/core/src/test/java/org/elasticsearch/index/analysis/FingerprintAnalyzerTests.java @@ -43,12 +43,15 @@ public class FingerprintAnalyzerTests extends ESTokenStreamTestCase { Analyzer a = new FingerprintAnalyzer(CharArraySet.EMPTY_SET, ' ', 255, false); assertAnalyzesTo(a, "gödel escher bach", new String[]{"bach escher godel"}); + + assertAnalyzesTo(a, "gödel godel escher bach", + new String[]{"bach escher godel"}); } public void testPreserveOriginal() throws Exception { Analyzer a = new FingerprintAnalyzer(CharArraySet.EMPTY_SET, ' ', 255, true); assertAnalyzesTo(a, "gödel escher bach", - new String[]{"bach escher godel", "bach escher gödel"}); + new String[]{"bach escher godel gödel"}); } public void testLimit() throws Exception { @@ -65,4 +68,5 @@ public class FingerprintAnalyzerTests extends ESTokenStreamTestCase { assertAnalyzesTo(a, "b c a", new String[]{"a_b_c"}); } + } diff --git a/docs/reference/analysis/analyzers/fingerprint-analyzer.asciidoc b/docs/reference/analysis/analyzers/fingerprint-analyzer.asciidoc index a66495acdbe..b393c883441 100644 --- a/docs/reference/analysis/analyzers/fingerprint-analyzer.asciidoc +++ b/docs/reference/analysis/analyzers/fingerprint-analyzer.asciidoc @@ -17,11 +17,11 @@ It consists of: Tokenizer:: * <> -Token Filters:: -* <> -* <> (disabled by default) -* <> -* <> +Token Filters (in order):: +1. <> +2. <> +3. <> (disabled by default) +4. <> [float] === Example output @@ -68,7 +68,6 @@ The `fingerprint` analyzer accepts the following parameters: A pre-defined stop words list like `_english_` or an array containing a list of stop words. Defaults to `_none_`. - `stopwords_path`:: The path to a file containing stop words. diff --git a/docs/reference/docs/reindex.asciidoc b/docs/reference/docs/reindex.asciidoc index 00c5d34304e..49ee8dcd283 100644 --- a/docs/reference/docs/reindex.asciidoc +++ b/docs/reference/docs/reindex.asciidoc @@ -174,7 +174,7 @@ POST _reindex } -------------------------------------------------- // CONSOLE -// TEST[s/^/PUT twitter\nPUT blog\n/] +// TEST[s/^/PUT twitter\nPUT blog\nGET _cluster\/health?wait_for_status=yellow\n/] It's also possible to limit the number of processed documents by setting `size`. This will only copy a single document from `twitter` to @@ -299,7 +299,7 @@ POST _reindex } -------------------------------------------------- // CONSOLE -// TEST[s/^/PUT source\n/] +// TEST[s/^/PUT source\nGET _cluster\/health?wait_for_status=yellow\n/] By default `_reindex` uses scroll batches of 100. You can change the batch size with the `size` field in the `source` element: @@ -319,7 +319,7 @@ POST _reindex } -------------------------------------------------- // CONSOLE -// TEST[s/^/PUT source\n/] +// TEST[s/^/PUT source\nGET _cluster\/health?wait_for_status=yellow\n/] Reindex can also use the <> feature by specifying a `pipeline` like this: @@ -338,7 +338,7 @@ POST _reindex } -------------------------------------------------- // CONSOLE -// TEST[s/^/PUT source\n/] +// TEST[s/^/PUT source\nGET _cluster\/health?wait_for_status=yellow\n/] [float] === URL Parameters @@ -435,7 +435,7 @@ While Reindex is running you can fetch their status using the [source,js] -------------------------------------------------- -GET _tasks/?pretty&detailed=true&actions=*reindex +GET _tasks?detailed=true&actions=*reindex -------------------------------------------------- // CONSOLE @@ -534,7 +534,7 @@ create an index containing documents that look like this: [source,js] -------------------------------------------------- -POST test/test/1?refresh&pretty +POST test/test/1?refresh { "text": "words words", "flag": "foo" @@ -547,7 +547,7 @@ But you don't like the name `flag` and want to replace it with `tag`. [source,js] -------------------------------------------------- -POST _reindex?pretty +POST _reindex { "source": { "index": "test" @@ -567,7 +567,7 @@ Now you can get the new document: [source,js] -------------------------------------------------- -GET test2/test/1?pretty +GET test2/test/1 -------------------------------------------------- // CONSOLE // TEST[continued] diff --git a/docs/reference/docs/update-by-query.asciidoc b/docs/reference/docs/update-by-query.asciidoc index 2de592f59a1..f049e302b34 100644 --- a/docs/reference/docs/update-by-query.asciidoc +++ b/docs/reference/docs/update-by-query.asciidoc @@ -134,7 +134,7 @@ types at once, just like the search API: POST twitter,blog/tweet,post/_update_by_query -------------------------------------------------- // CONSOLE -// TEST[s/^/PUT twitter\nPUT blog\n/] +// TEST[s/^/PUT twitter\nPUT blog\nGET _cluster\/health?wait_for_status=yellow\n/] If you provide `routing` then the routing is copied to the scroll query, limiting the process to the shards that match that routing value: @@ -266,7 +266,7 @@ While Update By Query is running you can fetch their status using the [source,js] -------------------------------------------------- -GET _tasks/?pretty&detailed=true&action=*byquery +GET _tasks?detailed=true&action=*byquery -------------------------------------------------- // CONSOLE diff --git a/qa/vagrant/src/test/resources/packaging/scripts/30_deb_package.bats b/qa/vagrant/src/test/resources/packaging/scripts/30_deb_package.bats index b1136c39b9f..1f4cdeeeb3f 100644 --- a/qa/vagrant/src/test/resources/packaging/scripts/30_deb_package.bats +++ b/qa/vagrant/src/test/resources/packaging/scripts/30_deb_package.bats @@ -40,6 +40,10 @@ setup() { export_elasticsearch_paths } +@test "[DEB] package depends on bash" { + dpkg -I elasticsearch-$(cat version).deb | grep "Depends:.*bash.*" +} + ################################## # Install DEB package ################################## diff --git a/qa/vagrant/src/test/resources/packaging/scripts/40_rpm_package.bats b/qa/vagrant/src/test/resources/packaging/scripts/40_rpm_package.bats index 0555f55cba6..c47f24e6c67 100644 --- a/qa/vagrant/src/test/resources/packaging/scripts/40_rpm_package.bats +++ b/qa/vagrant/src/test/resources/packaging/scripts/40_rpm_package.bats @@ -39,6 +39,10 @@ setup() { export_elasticsearch_paths } +@test "[RPM] package depends on bash" { + rpm -qpR elasticsearch-$(cat version).rpm | grep '/bin/bash' +} + ################################## # Install RPM package ##################################