From f10c245492b6b1bf5f94921619f223fafc7e1ae8 Mon Sep 17 00:00:00 2001 From: David Turner Date: Tue, 17 Mar 2020 14:04:42 +0000 Subject: [PATCH 1/2] Fix deprecation in history retention docs (#53655) This commit adjusts a `deprecation[...]` message in the docs since such messages must be on a single line. It also moves this message to the start of the description of the deprecated setting as is the case with other such messages. --- docs/reference/index-modules/history-retention.asciidoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/reference/index-modules/history-retention.asciidoc b/docs/reference/index-modules/history-retention.asciidoc index 8df79625c88d0..8e283d18f2ba8 100644 --- a/docs/reference/index-modules/history-retention.asciidoc +++ b/docs/reference/index-modules/history-retention.asciidoc @@ -61,12 +61,11 @@ there>>. {ccr-cap} will not function if soft deletes are disabled. `index.soft_deletes.enabled`:: + deprecated:[7.6.0, Creating indices with soft-deletes disabled is deprecated and will be removed in future Elasticsearch versions.] Whether or not soft deletes are enabled on the index. Soft deletes can only be configured at index creation and only on indices created on or after 6.5.0. The default value is `true`. - deprecated::[7.6, Creating indices with soft-deletes disabled is - deprecated and will be removed in future Elasticsearch versions.] `index.soft_deletes.retention_lease.period`:: From 4bd58b8c501307b769265b2017a28ee754a8423f Mon Sep 17 00:00:00 2001 From: David Turner Date: Tue, 17 Mar 2020 15:32:41 +0000 Subject: [PATCH 2/2] Revert "Fix SourceOnlySnapshotIT (#53462)" (#53671) This reverts commit 7ba9cf5d083ba6ab3fac316cb970184576c56c2d. --- .../snapshots/SourceOnlySnapshotIT.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/snapshots/SourceOnlySnapshotIT.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/snapshots/SourceOnlySnapshotIT.java index 5c5a7745d8132..178c3d163c4fc 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/snapshots/SourceOnlySnapshotIT.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/snapshots/SourceOnlySnapshotIT.java @@ -106,9 +106,9 @@ public void testSnapshotAndRestore() throws Exception { }); assertTrue(e.toString().contains("_source only indices can't be searched or filtered")); - // can-match phase pre-filters access to non-existing field - assertEquals(0, - client().prepareSearch(sourceIdx).setQuery(QueryBuilders.termQuery("field1", "bar")).get().getHits().getTotalHits().value); + e = expectThrows(SearchPhaseExecutionException.class, () -> + client().prepareSearch(sourceIdx).setQuery(QueryBuilders.termQuery("field1", "bar")).get()); + assertTrue(e.toString().contains("_source only indices can't be searched or filtered")); // make sure deletes do not work String idToDelete = "" + randomIntBetween(0, builders.length); expectThrows(ClusterBlockException.class, () -> client().prepareDelete(sourceIdx, "_doc", idToDelete) @@ -131,9 +131,9 @@ public void testSnapshotAndRestoreWithNested() throws Exception { SearchPhaseExecutionException e = expectThrows(SearchPhaseExecutionException.class, () -> client().prepareSearch(sourceIdx).setQuery(QueryBuilders.idsQuery().addIds("" + randomIntBetween(0, builders.length))).get()); assertTrue(e.toString().contains("_source only indices can't be searched or filtered")); - // can-match phase pre-filters access to non-existing field - assertEquals(0, - client().prepareSearch(sourceIdx).setQuery(QueryBuilders.termQuery("field1", "bar")).get().getHits().getTotalHits().value); + e = expectThrows(SearchPhaseExecutionException.class, () -> + client().prepareSearch(sourceIdx).setQuery(QueryBuilders.termQuery("field1", "bar")).get()); + assertTrue(e.toString().contains("_source only indices can't be searched or filtered")); // make sure deletes do not work String idToDelete = "" + randomIntBetween(0, builders.length); expectThrows(ClusterBlockException.class, () -> client().prepareDelete(sourceIdx, "_doc", idToDelete)