Skip to content

Commit

Permalink
Merge branch '7.6' into re-struct-2-7.6
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Mar 17, 2020
2 parents 02b2521 + 4bd58b8 commit 28e1115
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions docs/reference/index-modules/history-retention.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 28e1115

Please sign in to comment.