diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java index 9ebd86642598f..88e95b632ccae 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java @@ -819,7 +819,9 @@ public void testApiNamingConventions() throws Exception { "scripts_painless_execute", "indices.simulate_template", "indices.resolve_index", - "indices.add_block" + "indices.add_block", + "open_point_in_time", + "close_point_in_time" }; //These API are not required for high-level client feature completeness String[] notRequiredApi = new String[] { diff --git a/docs/reference/search/point-in-time-api.asciidoc b/docs/reference/search/point-in-time-api.asciidoc index dc7644c7f3c22..5091d650594a0 100644 --- a/docs/reference/search/point-in-time-api.asciidoc +++ b/docs/reference/search/point-in-time-api.asciidoc @@ -1,5 +1,3 @@ -[role="xpack"] -[testenv="basic"] [[point-in-time-api]] === Point in time API ++++ diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/close_point_in_time.json b/rest-api-spec/src/main/resources/rest-api-spec/api/close_point_in_time.json similarity index 100% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/close_point_in_time.json rename to rest-api-spec/src/main/resources/rest-api-spec/api/close_point_in_time.json diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/api/open_point_in_time.json b/rest-api-spec/src/main/resources/rest-api-spec/api/open_point_in_time.json similarity index 100% rename from x-pack/plugin/src/test/resources/rest-api-spec/api/open_point_in_time.json rename to rest-api-spec/src/main/resources/rest-api-spec/api/open_point_in_time.json diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/search/point_in_time.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/350_point_in_time.yml similarity index 98% rename from x-pack/plugin/src/test/resources/rest-api-spec/test/search/point_in_time.yml rename to rest-api-spec/src/main/resources/rest-api-spec/test/search/350_point_in_time.yml index 73b2b9b140ff9..e3b87060be9c7 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/search/point_in_time.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/350_point_in_time.yml @@ -37,8 +37,8 @@ setup: --- "basic": - skip: - version: " - 7.9.99" - reason: "point in time is introduced in 7.10" + version: " - 7.99.99" + reason: "point in time is introduced in server in 8.0" - do: open_point_in_time: index: test diff --git a/x-pack/plugin/core/src/internalClusterTest/java/org/elasticsearch/xpack/core/search/CCSPointInTimeIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/search/CCSPointInTimeIT.java similarity index 81% rename from x-pack/plugin/core/src/internalClusterTest/java/org/elasticsearch/xpack/core/search/CCSPointInTimeIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/search/CCSPointInTimeIT.java index 0e91ebfc160ec..3f8de561d35d9 100644 --- a/x-pack/plugin/core/src/internalClusterTest/java/org/elasticsearch/xpack/core/search/CCSPointInTimeIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/action/search/CCSPointInTimeIT.java @@ -1,3 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -5,21 +13,13 @@ * 2.0. */ -package org.elasticsearch.xpack.core.search; +package org.elasticsearch.action.search; -import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.client.Client; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.query.MatchAllQueryBuilder; -import org.elasticsearch.plugins.Plugin; import org.elasticsearch.search.builder.PointInTimeBuilder; import org.elasticsearch.test.AbstractMultiClustersTestCase; -import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeAction; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeRequest; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeAction; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeRequest; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeResponse; import java.util.ArrayList; import java.util.Collection; @@ -36,12 +36,6 @@ protected Collection remoteClusterAlias() { return List.of("remote_cluster"); } - @Override - protected Collection> nodePlugins(String clusterAlias) { - final List> plugins = new ArrayList<>(super.nodePlugins(clusterAlias)); - plugins.add(LocalStateCompositeXPackPlugin.class); - return plugins; - } void indexDocs(Client client, String index, int numDocs) { for (int i = 0; i < numDocs; i++) { diff --git a/x-pack/plugin/core/src/internalClusterTest/java/org/elasticsearch/xpack/core/search/PointInTimeIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/search/PointInTimeIT.java similarity index 95% rename from x-pack/plugin/core/src/internalClusterTest/java/org/elasticsearch/xpack/core/search/PointInTimeIT.java rename to server/src/internalClusterTest/java/org/elasticsearch/action/search/PointInTimeIT.java index 82650583f2fca..94eaf99fda9ec 100644 --- a/x-pack/plugin/core/src/internalClusterTest/java/org/elasticsearch/xpack/core/search/PointInTimeIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/action/search/PointInTimeIT.java @@ -1,3 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -5,16 +13,10 @@ * 2.0. */ -package org.elasticsearch.xpack.core.search; +package org.elasticsearch.action.search; import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.action.admin.indices.stats.CommonStats; -import org.elasticsearch.action.search.SearchPhaseExecutionException; -import org.elasticsearch.action.search.SearchRequest; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.action.search.SearchResponse; -import org.elasticsearch.action.search.SearchType; -import org.elasticsearch.action.search.ShardSearchFailure; import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.common.settings.Settings; @@ -26,7 +28,6 @@ import org.elasticsearch.index.query.RangeQueryBuilder; import org.elasticsearch.index.shard.IndexShard; import org.elasticsearch.indices.IndicesService; -import org.elasticsearch.plugins.Plugin; import org.elasticsearch.search.SearchContextMissingException; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchService; @@ -35,15 +36,7 @@ import org.elasticsearch.search.sort.SortBuilders; import org.elasticsearch.search.sort.SortOrder; import org.elasticsearch.test.ESIntegTestCase; -import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeAction; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeRequest; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeAction; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeRequest; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeResponse; -import java.util.Collection; -import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -72,11 +65,6 @@ protected Settings nodeSettings(int nodeOrdinal) { .build(); } - @Override - protected Collection> nodePlugins() { - return Collections.singleton(LocalStateCompositeXPackPlugin.class); - } - public void testBasic() { createIndex("test"); int numDocs = randomIntBetween(10, 50); diff --git a/server/src/main/java/org/elasticsearch/action/ActionModule.java b/server/src/main/java/org/elasticsearch/action/ActionModule.java index 634781b5fa92a..8e4ae2cd53738 100644 --- a/server/src/main/java/org/elasticsearch/action/ActionModule.java +++ b/server/src/main/java/org/elasticsearch/action/ActionModule.java @@ -204,11 +204,17 @@ import org.elasticsearch.action.main.MainAction; import org.elasticsearch.action.main.TransportMainAction; import org.elasticsearch.action.search.ClearScrollAction; +import org.elasticsearch.action.search.ClosePointInTimeAction; import org.elasticsearch.action.search.MultiSearchAction; +import org.elasticsearch.action.search.OpenPointInTimeAction; +import org.elasticsearch.action.search.RestClosePointInTimeAction; +import org.elasticsearch.action.search.RestOpenPointInTimeAction; import org.elasticsearch.action.search.SearchAction; import org.elasticsearch.action.search.SearchScrollAction; import org.elasticsearch.action.search.TransportClearScrollAction; +import org.elasticsearch.action.search.TransportClosePointInTimeAction; import org.elasticsearch.action.search.TransportMultiSearchAction; +import org.elasticsearch.action.search.TransportOpenPointInTimeAction; import org.elasticsearch.action.search.TransportSearchAction; import org.elasticsearch.action.search.TransportSearchScrollAction; import org.elasticsearch.action.support.ActionFilters; @@ -567,6 +573,8 @@ public void reg actions.register(TransportShardBulkAction.TYPE, TransportShardBulkAction.class); actions.register(SearchAction.INSTANCE, TransportSearchAction.class); actions.register(SearchScrollAction.INSTANCE, TransportSearchScrollAction.class); + actions.register(OpenPointInTimeAction.INSTANCE, TransportOpenPointInTimeAction.class); + actions.register(ClosePointInTimeAction.INSTANCE, TransportClosePointInTimeAction.class); actions.register(MultiSearchAction.INSTANCE, TransportMultiSearchAction.class); actions.register(ExplainAction.INSTANCE, TransportExplainAction.class); actions.register(ClearScrollAction.INSTANCE, TransportClearScrollAction.class); @@ -727,6 +735,8 @@ public void initRestHandlers(Supplier nodesInCluster) { registerHandler.accept(new RestSearchAction()); registerHandler.accept(new RestSearchScrollAction()); registerHandler.accept(new RestClearScrollAction()); + registerHandler.accept(new RestOpenPointInTimeAction()); + registerHandler.accept(new RestClosePointInTimeAction()); registerHandler.accept(new RestMultiSearchAction(settings)); registerHandler.accept(new RestValidateQueryAction()); diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/ClosePointInTimeAction.java b/server/src/main/java/org/elasticsearch/action/search/ClosePointInTimeAction.java similarity index 62% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/ClosePointInTimeAction.java rename to server/src/main/java/org/elasticsearch/action/search/ClosePointInTimeAction.java index 86046b613d954..248aab21973c8 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/ClosePointInTimeAction.java +++ b/server/src/main/java/org/elasticsearch/action/search/ClosePointInTimeAction.java @@ -1,3 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -5,7 +13,7 @@ * 2.0. */ -package org.elasticsearch.xpack.core.search.action; +package org.elasticsearch.action.search; import org.elasticsearch.action.ActionType; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/ClosePointInTimeRequest.java b/server/src/main/java/org/elasticsearch/action/search/ClosePointInTimeRequest.java similarity index 88% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/ClosePointInTimeRequest.java rename to server/src/main/java/org/elasticsearch/action/search/ClosePointInTimeRequest.java index c7c75fa05ab3d..fda359b7d9d95 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/ClosePointInTimeRequest.java +++ b/server/src/main/java/org/elasticsearch/action/search/ClosePointInTimeRequest.java @@ -1,3 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -5,7 +13,7 @@ * 2.0. */ -package org.elasticsearch.xpack.core.search.action; +package org.elasticsearch.action.search; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/ClosePointInTimeResponse.java b/server/src/main/java/org/elasticsearch/action/search/ClosePointInTimeResponse.java similarity index 63% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/ClosePointInTimeResponse.java rename to server/src/main/java/org/elasticsearch/action/search/ClosePointInTimeResponse.java index 768604ec79e78..8511ba692a72e 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/ClosePointInTimeResponse.java +++ b/server/src/main/java/org/elasticsearch/action/search/ClosePointInTimeResponse.java @@ -1,3 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -5,7 +13,7 @@ * 2.0. */ -package org.elasticsearch.xpack.core.search.action; +package org.elasticsearch.action.search; import org.elasticsearch.action.search.ClearScrollResponse; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/OpenPointInTimeAction.java b/server/src/main/java/org/elasticsearch/action/search/OpenPointInTimeAction.java similarity index 61% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/OpenPointInTimeAction.java rename to server/src/main/java/org/elasticsearch/action/search/OpenPointInTimeAction.java index b92accf536698..7ec2e79f1df0d 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/OpenPointInTimeAction.java +++ b/server/src/main/java/org/elasticsearch/action/search/OpenPointInTimeAction.java @@ -1,3 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -5,7 +13,7 @@ * 2.0. */ -package org.elasticsearch.xpack.core.search.action; +package org.elasticsearch.action.search; import org.elasticsearch.action.ActionType; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/OpenPointInTimeRequest.java b/server/src/main/java/org/elasticsearch/action/search/OpenPointInTimeRequest.java similarity index 90% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/OpenPointInTimeRequest.java rename to server/src/main/java/org/elasticsearch/action/search/OpenPointInTimeRequest.java index 0495f23922a66..c4875f81896ae 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/OpenPointInTimeRequest.java +++ b/server/src/main/java/org/elasticsearch/action/search/OpenPointInTimeRequest.java @@ -1,3 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -5,12 +13,11 @@ * 2.0. */ -package org.elasticsearch.xpack.core.search.action; +package org.elasticsearch.action.search; import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; import org.elasticsearch.action.IndicesRequest; -import org.elasticsearch.action.search.SearchTask; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.io.stream.StreamInput; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/OpenPointInTimeResponse.java b/server/src/main/java/org/elasticsearch/action/search/OpenPointInTimeResponse.java similarity index 80% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/OpenPointInTimeResponse.java rename to server/src/main/java/org/elasticsearch/action/search/OpenPointInTimeResponse.java index 9776e2f936c80..406417f2dbd53 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/OpenPointInTimeResponse.java +++ b/server/src/main/java/org/elasticsearch/action/search/OpenPointInTimeResponse.java @@ -1,3 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -5,7 +13,7 @@ * 2.0. */ -package org.elasticsearch.xpack.core.search.action; +package org.elasticsearch.action.search; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.common.ParseField; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/RestClosePointInTimeAction.java b/server/src/main/java/org/elasticsearch/action/search/RestClosePointInTimeAction.java similarity index 77% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/RestClosePointInTimeAction.java rename to server/src/main/java/org/elasticsearch/action/search/RestClosePointInTimeAction.java index 310244b2a66ff..d135de5126320 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/RestClosePointInTimeAction.java +++ b/server/src/main/java/org/elasticsearch/action/search/RestClosePointInTimeAction.java @@ -1,3 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -5,7 +13,7 @@ * 2.0. */ -package org.elasticsearch.xpack.core.search.action; +package org.elasticsearch.action.search; import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.xcontent.XContentParser; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/RestOpenPointInTimeAction.java b/server/src/main/java/org/elasticsearch/action/search/RestOpenPointInTimeAction.java similarity index 82% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/RestOpenPointInTimeAction.java rename to server/src/main/java/org/elasticsearch/action/search/RestOpenPointInTimeAction.java index 9b13f1b102a12..8cdf3317be40c 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/RestOpenPointInTimeAction.java +++ b/server/src/main/java/org/elasticsearch/action/search/RestOpenPointInTimeAction.java @@ -1,3 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -5,7 +13,7 @@ * 2.0. */ -package org.elasticsearch.xpack.core.search.action; +package org.elasticsearch.action.search; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.client.node.NodeClient; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/TransportClosePointInTimeAction.java b/server/src/main/java/org/elasticsearch/action/search/TransportClosePointInTimeAction.java similarity index 84% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/TransportClosePointInTimeAction.java rename to server/src/main/java/org/elasticsearch/action/search/TransportClosePointInTimeAction.java index 075979e13d945..a7cd4e45fdc18 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/TransportClosePointInTimeAction.java +++ b/server/src/main/java/org/elasticsearch/action/search/TransportClosePointInTimeAction.java @@ -1,3 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -5,13 +13,9 @@ * 2.0. */ -package org.elasticsearch.xpack.core.search.action; +package org.elasticsearch.action.search; import org.elasticsearch.action.ActionListener; -import org.elasticsearch.action.search.ClearScrollController; -import org.elasticsearch.action.search.SearchContextId; -import org.elasticsearch.action.search.SearchContextIdForNode; -import org.elasticsearch.action.search.SearchTransportService; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.HandledTransportAction; import org.elasticsearch.cluster.service.ClusterService; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/TransportOpenPointInTimeAction.java b/server/src/main/java/org/elasticsearch/action/search/TransportOpenPointInTimeAction.java similarity index 94% rename from x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/TransportOpenPointInTimeAction.java rename to server/src/main/java/org/elasticsearch/action/search/TransportOpenPointInTimeAction.java index 002fb9eef510d..aeec3c5775818 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/TransportOpenPointInTimeAction.java +++ b/server/src/main/java/org/elasticsearch/action/search/TransportOpenPointInTimeAction.java @@ -1,3 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License @@ -5,14 +13,12 @@ * 2.0. */ -package org.elasticsearch.xpack.core.search.action; +package org.elasticsearch.action.search; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionListenerResponseHandler; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.OriginalIndices; -import org.elasticsearch.action.search.SearchRequest; -import org.elasticsearch.action.search.TransportSearchAction; import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.ChannelActionListener; import org.elasticsearch.action.support.HandledTransportAction; diff --git a/x-pack/plugin/async-search/src/internalClusterTest/java/org/elasticsearch/xpack/search/AsyncSearchIntegTestCase.java b/x-pack/plugin/async-search/src/internalClusterTest/java/org/elasticsearch/xpack/search/AsyncSearchIntegTestCase.java index 6b4eb938a8c7a..c2ffb696ba4cc 100644 --- a/x-pack/plugin/async-search/src/internalClusterTest/java/org/elasticsearch/xpack/search/AsyncSearchIntegTestCase.java +++ b/x-pack/plugin/async-search/src/internalClusterTest/java/org/elasticsearch/xpack/search/AsyncSearchIntegTestCase.java @@ -40,12 +40,12 @@ import org.elasticsearch.xpack.core.async.GetAsyncStatusRequest; import org.elasticsearch.xpack.core.search.action.AsyncSearchResponse; import org.elasticsearch.xpack.core.search.action.AsyncStatusResponse; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeAction; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeRequest; +import org.elasticsearch.action.search.ClosePointInTimeAction; +import org.elasticsearch.action.search.ClosePointInTimeRequest; import org.elasticsearch.xpack.core.search.action.GetAsyncSearchAction; import org.elasticsearch.xpack.core.search.action.GetAsyncStatusAction; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeAction; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeRequest; +import org.elasticsearch.action.search.OpenPointInTimeAction; +import org.elasticsearch.action.search.OpenPointInTimeRequest; import org.elasticsearch.xpack.core.search.action.SubmitAsyncSearchAction; import org.elasticsearch.xpack.core.search.action.SubmitAsyncSearchRequest; import org.elasticsearch.xpack.ilm.IndexLifecycle; diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackPlugin.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackPlugin.java index 796a1c04c602f..7483665806de6 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackPlugin.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackPlugin.java @@ -76,12 +76,6 @@ import org.elasticsearch.xpack.core.rest.action.RestReloadAnalyzersAction; import org.elasticsearch.xpack.core.rest.action.RestXPackInfoAction; import org.elasticsearch.xpack.core.rest.action.RestXPackUsageAction; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeAction; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeAction; -import org.elasticsearch.xpack.core.search.action.RestClosePointInTimeAction; -import org.elasticsearch.xpack.core.search.action.RestOpenPointInTimeAction; -import org.elasticsearch.xpack.core.search.action.TransportClosePointInTimeAction; -import org.elasticsearch.xpack.core.search.action.TransportOpenPointInTimeAction; import org.elasticsearch.xpack.core.security.authc.TokenMetadata; import org.elasticsearch.xpack.core.ssl.SSLConfiguration; import org.elasticsearch.xpack.core.ssl.SSLConfigurationReloader; @@ -285,8 +279,6 @@ public Collection createComponents(Client client, ClusterService cluster actions.addAll(licensing.getActions()); actions.add(new ActionHandler<>(ReloadAnalyzerAction.INSTANCE, TransportReloadAnalyzersAction.class)); actions.add(new ActionHandler<>(DeleteAsyncResultAction.INSTANCE, TransportDeleteAsyncResultAction.class)); - actions.add(new ActionHandler<>(OpenPointInTimeAction.INSTANCE, TransportOpenPointInTimeAction.class)); - actions.add(new ActionHandler<>(ClosePointInTimeAction.INSTANCE, TransportClosePointInTimeAction.class)); actions.add(new ActionHandler<>(XPackInfoFeatureAction.DATA_TIERS, DataTiersInfoTransportAction.class)); actions.add(new ActionHandler<>(XPackUsageFeatureAction.DATA_TIERS, DataTiersUsageTransportAction.class)); return actions; @@ -327,8 +319,6 @@ public List getRestHandlers(Settings settings, RestController restC handlers.add(new RestReloadAnalyzersAction()); handlers.addAll(licensing.getRestHandlers(settings, restController, clusterSettings, indexScopedSettings, settingsFilter, indexNameExpressionResolver, nodesInCluster)); - handlers.add(new RestOpenPointInTimeAction()); - handlers.add(new RestClosePointInTimeAction()); return handlers; } diff --git a/x-pack/plugin/data-streams/qa/rest/build.gradle b/x-pack/plugin/data-streams/qa/rest/build.gradle index 5f45157f1f6a5..72ab5c18a7509 100644 --- a/x-pack/plugin/data-streams/qa/rest/build.gradle +++ b/x-pack/plugin/data-streams/qa/rest/build.gradle @@ -5,8 +5,8 @@ apply plugin: 'elasticsearch.java-rest-test' restResources { restApi { - includeCore 'bulk', 'count', 'search', '_common', 'indices', 'index', 'cluster', 'rank_eval', 'reindex', 'update_by_query', 'delete_by_query' - includeXpack 'eql', 'indices', 'data_stream', 'migration', 'async_search', 'searchable_snapshots', 'rollup', 'graph', 'ilm', 'open_point_in_time', 'close_point_in_time' + includeCore 'bulk', 'count', 'search', '_common', 'indices', 'index', 'cluster', 'rank_eval', 'reindex', 'update_by_query', 'delete_by_query', 'open_point_in_time', 'close_point_in_time' + includeXpack 'eql', 'indices', 'data_stream', 'migration', 'async_search', 'searchable_snapshots', 'rollup', 'graph', 'ilm' } restTests { includeXpack 'data_stream' diff --git a/x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/execution/search/PITAwareQueryClient.java b/x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/execution/search/PITAwareQueryClient.java index 310d0a9bad0fc..be07bde2ddbe8 100644 --- a/x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/execution/search/PITAwareQueryClient.java +++ b/x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/execution/search/PITAwareQueryClient.java @@ -19,11 +19,11 @@ import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.search.builder.PointInTimeBuilder; import org.elasticsearch.search.builder.SearchSourceBuilder; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeAction; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeRequest; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeResponse; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeAction; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeRequest; +import org.elasticsearch.action.search.ClosePointInTimeAction; +import org.elasticsearch.action.search.ClosePointInTimeRequest; +import org.elasticsearch.action.search.ClosePointInTimeResponse; +import org.elasticsearch.action.search.OpenPointInTimeAction; +import org.elasticsearch.action.search.OpenPointInTimeRequest; import org.elasticsearch.xpack.eql.session.EqlSession; import org.elasticsearch.xpack.ql.index.IndexResolver; diff --git a/x-pack/plugin/frozen-indices/src/internalClusterTest/java/org/elasticsearch/index/engine/FrozenIndexIT.java b/x-pack/plugin/frozen-indices/src/internalClusterTest/java/org/elasticsearch/index/engine/FrozenIndexIT.java index 5b79473cbf1dd..7a55dcca0fcaf 100644 --- a/x-pack/plugin/frozen-indices/src/internalClusterTest/java/org/elasticsearch/index/engine/FrozenIndexIT.java +++ b/x-pack/plugin/frozen-indices/src/internalClusterTest/java/org/elasticsearch/index/engine/FrozenIndexIT.java @@ -32,10 +32,10 @@ import org.elasticsearch.test.InternalTestCluster; import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; import org.elasticsearch.xpack.core.frozen.action.FreezeIndexAction; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeAction; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeRequest; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeAction; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeRequest; +import org.elasticsearch.action.search.ClosePointInTimeAction; +import org.elasticsearch.action.search.ClosePointInTimeRequest; +import org.elasticsearch.action.search.OpenPointInTimeAction; +import org.elasticsearch.action.search.OpenPointInTimeRequest; import org.elasticsearch.xpack.frozen.FrozenIndices; import org.joda.time.Instant; diff --git a/x-pack/plugin/frozen-indices/src/internalClusterTest/java/org/elasticsearch/index/engine/FrozenIndexTests.java b/x-pack/plugin/frozen-indices/src/internalClusterTest/java/org/elasticsearch/index/engine/FrozenIndexTests.java index 8bddac0fc35f3..3945ae9a9bd3f 100644 --- a/x-pack/plugin/frozen-indices/src/internalClusterTest/java/org/elasticsearch/index/engine/FrozenIndexTests.java +++ b/x-pack/plugin/frozen-indices/src/internalClusterTest/java/org/elasticsearch/index/engine/FrozenIndexTests.java @@ -50,11 +50,11 @@ import org.elasticsearch.test.ESSingleNodeTestCase; import org.elasticsearch.xpack.core.LocalStateCompositeXPackPlugin; import org.elasticsearch.xpack.core.frozen.action.FreezeIndexAction; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeAction; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeRequest; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeAction; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeRequest; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeResponse; +import org.elasticsearch.action.search.ClosePointInTimeAction; +import org.elasticsearch.action.search.ClosePointInTimeRequest; +import org.elasticsearch.action.search.OpenPointInTimeAction; +import org.elasticsearch.action.search.OpenPointInTimeRequest; +import org.elasticsearch.action.search.OpenPointInTimeResponse; import org.elasticsearch.xpack.frozen.FrozenIndices; import org.hamcrest.Matchers; diff --git a/x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/RetrySearchIntegTests.java b/x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/RetrySearchIntegTests.java index c497533c8f6ab..ff5a312ee29b0 100644 --- a/x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/RetrySearchIntegTests.java +++ b/x-pack/plugin/searchable-snapshots/src/internalClusterTest/java/org/elasticsearch/xpack/searchablesnapshots/RetrySearchIntegTests.java @@ -20,10 +20,10 @@ import org.elasticsearch.indices.IndicesService; import org.elasticsearch.search.builder.PointInTimeBuilder; import org.elasticsearch.snapshots.SnapshotId; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeAction; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeRequest; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeAction; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeRequest; +import org.elasticsearch.action.search.ClosePointInTimeAction; +import org.elasticsearch.action.search.ClosePointInTimeRequest; +import org.elasticsearch.action.search.OpenPointInTimeAction; +import org.elasticsearch.action.search.OpenPointInTimeRequest; import java.util.ArrayList; import java.util.List; diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java index 5872711eb04c2..2156900658488 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DocumentLevelSecurityTests.java @@ -63,8 +63,8 @@ import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.xpack.core.XPackSettings; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeAction; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeRequest; +import org.elasticsearch.action.search.ClosePointInTimeAction; +import org.elasticsearch.action.search.ClosePointInTimeRequest; import org.elasticsearch.xpack.security.LocalStateSecurity; import org.elasticsearch.xpack.spatial.SpatialPlugin; import org.elasticsearch.xpack.spatial.index.query.ShapeQueryBuilder; diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/FieldLevelSecurityTests.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/FieldLevelSecurityTests.java index c3081c43687d4..20d755b82de51 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/FieldLevelSecurityTests.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/FieldLevelSecurityTests.java @@ -49,11 +49,11 @@ import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.test.SecuritySettingsSourceField; import org.elasticsearch.xpack.core.XPackSettings; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeAction; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeRequest; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeAction; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeRequest; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeResponse; +import org.elasticsearch.action.search.ClosePointInTimeAction; +import org.elasticsearch.action.search.ClosePointInTimeRequest; +import org.elasticsearch.action.search.OpenPointInTimeAction; +import org.elasticsearch.action.search.OpenPointInTimeRequest; +import org.elasticsearch.action.search.OpenPointInTimeResponse; import org.elasticsearch.xpack.security.LocalStateSecurity; import org.elasticsearch.xpack.spatial.SpatialPlugin; import org.elasticsearch.xpack.spatial.index.query.ShapeQueryBuilder; diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java index 1d6bfaef8f324..f12432221ac26 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/IndicesAndAliasesResolver.java @@ -31,7 +31,7 @@ import org.elasticsearch.transport.RemoteClusterAware; import org.elasticsearch.transport.RemoteConnectionStrategy; import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeRequest; +import org.elasticsearch.action.search.OpenPointInTimeRequest; import org.elasticsearch.xpack.core.security.authz.ResolvedIndices; import java.util.ArrayList; diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/RBACEngine.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/RBACEngine.java index 553a94fd95b60..ae3602f572099 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/RBACEngine.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authz/RBACEngine.java @@ -37,7 +37,7 @@ import org.elasticsearch.transport.TransportRequest; import org.elasticsearch.xpack.core.async.DeleteAsyncResultAction; import org.elasticsearch.xpack.core.eql.EqlAsyncActionNames; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeAction; +import org.elasticsearch.action.search.ClosePointInTimeAction; import org.elasticsearch.xpack.core.search.action.GetAsyncSearchAction; import org.elasticsearch.xpack.core.search.action.SubmitAsyncSearchAction; import org.elasticsearch.xpack.core.security.action.GetApiKeyAction; diff --git a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java index 06559b1b77657..1c5a903913072 100644 --- a/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java +++ b/x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/AuthorizationServiceTests.java @@ -105,10 +105,10 @@ import org.elasticsearch.threadpool.ThreadPool.Names; import org.elasticsearch.transport.TransportActionProxy; import org.elasticsearch.transport.TransportRequest; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeAction; -import org.elasticsearch.xpack.core.search.action.ClosePointInTimeRequest; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeAction; -import org.elasticsearch.xpack.core.search.action.OpenPointInTimeRequest; +import org.elasticsearch.action.search.ClosePointInTimeAction; +import org.elasticsearch.action.search.ClosePointInTimeRequest; +import org.elasticsearch.action.search.OpenPointInTimeAction; +import org.elasticsearch.action.search.OpenPointInTimeRequest; import org.elasticsearch.xpack.core.security.action.InvalidateApiKeyAction; import org.elasticsearch.xpack.core.security.action.InvalidateApiKeyRequest; import org.elasticsearch.xpack.core.security.action.privilege.DeletePrivilegesAction;