Apache Solr open-source search software
Rename CoreAdmin UPGRADECOREINDEX action to UPGRADEINDEX (#4387)
Rahul Goswamif254d00a6328
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex aea57a6a6d2..5cc055fa48f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -24,7 +24,7 @@ This file lists Solr's raw release notes with details of every change to Solr. M- Added new ConcurrentUpdateJdkSolrClient that works with HttpJdkSolrClient [SOLR-18065](https://issues.apache.org/jira/browse/SOLR-18065) (James Dyer)- Support including stored fields in Export Writer output. [SOLR-18071](https://issues.apache.org/jira/browse/SOLR-18071) (Luke Kot-Zaniewski)- Introducing support for multi valued dense vector representation in documents through nested vectors [SOLR-18074](https://issues.apache.org/jira/browse/SOLR-18074) (Alessandro Benedetti)-- CoreAdmin API (/admin/cores?action=UPGRADECOREINDEX) to upgrade an index in-place [SOLR-18096](https://issues.apache.org/jira/browse/SOLR-18096) (Rahul Goswami)+- CoreAdmin API (/admin/cores?action=UPGRADEINDEX) to upgrade an index in-place [SOLR-18096](https://issues.apache.org/jira/browse/SOLR-18096) (Rahul Goswami)- CrossDC Consumer - add Prometheus metrics [SOLR-18060](https://issues.apache.org/jira/browse/SOLR-18060) (Andrzej Bialecki @ab)- CrossDC - support arbitrary Kafka properties [SOLR-18062](https://issues.apache.org/jira/browse/SOLR-18062) (Andrzej Bialecki @ab)diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.java b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.javaindex 3cd2bb141e7..2edc70aef30 100644--- a/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.java+++ b/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminOperation.java@@ -38,7 +38,7 @@ import static org.apache.solr.common.params.CoreAdminParams.CoreAdminAction.SPLIimport static org.apache.solr.common.params.CoreAdminParams.CoreAdminAction.STATUS;import static org.apache.solr.common.params.CoreAdminParams.CoreAdminAction.SWAP;import static org.apache.solr.common.params.CoreAdminParams.CoreAdminAction.UNLOAD;-import static org.apache.solr.common.params.CoreAdminParams.CoreAdminAction.UPGRADECOREINDEX;+import static org.apache.solr.common.params.CoreAdminParams.CoreAdminAction.UPGRADEINDEX;import static org.apache.solr.handler.admin.CoreAdminHandler.CallInfo;import java.lang.invoke.MethodHandles;@@ -258,7 +258,7 @@ public enum CoreAdminOperation implements CoreAdminOp {V2ApiUtils.squashIntoSolrResponseWithoutHeader(it.rsp, response);}),- UPGRADECOREINDEX_OP(UPGRADECOREINDEX, new UpgradeCoreIndexOp());+ UPGRADEINDEX_OP(UPGRADEINDEX, new UpgradeCoreIndexOp());final CoreAdminParams.CoreAdminAction action;final CoreAdminOp fun;diff --git a/solr/core/src/java/org/apache/solr/handler/admin/UpgradeCoreIndexOp.java b/solr/core/src/java/org/apache/solr/handler/admin/UpgradeCoreIndexOp.javaindex 8fff5c93d31..350d07d9952 100644--- a/solr/core/src/java/org/apache/solr/handler/admin/UpgradeCoreIndexOp.java+++ b/solr/core/src/java/org/apache/solr/handler/admin/UpgradeCoreIndexOp.java@@ -54,7 +54,7 @@ class UpgradeCoreIndexOp implements CoreAdminHandler.CoreAdminOp {if (it.handler.coreContainer.isZooKeeperAware()) {throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,- "action=UPGRADECOREINDEX is not supported in SolrCloud mode. As an alternative, in order to upgrade index, configure LatestVersionMergePolicyFactory in solrconfig.xml and reindex the data in your collection.");+ "action=UPGRADEINDEX is not supported in SolrCloud mode. As an alternative, in order to upgrade index, configure LatestVersionMergePolicyFactory in solrconfig.xml and reindex the data in your collection.");}SolrParams params = it.req.getParams();diff --git a/solr/core/src/java/org/apache/solr/handler/admin/api/UpgradeCoreIndex.java b/solr/core/src/java/org/apache/solr/handler/admin/api/UpgradeCoreIndex.javaindex c92d3e20947..5e80526c0e3 100644--- a/solr/core/src/java/org/apache/solr/handler/admin/api/UpgradeCoreIndex.java+++ b/solr/core/src/java/org/apache/solr/handler/admin/api/UpgradeCoreIndex.java@@ -68,9 +68,9 @@ import org.slf4j.Logger;import org.slf4j.LoggerFactory;/**- * Implements the UPGRADECOREINDEX CoreAdmin action, which upgrades an existing core's index- * in-place by reindexing documents from segments belonging to older Lucene versions, so that they- * get written into latest version segments.+ * Implements the UPGRADEINDEX CoreAdmin action, which upgrades an existing core's index in-place by+ * reindexing documents from segments belonging to older Lucene versions, so that they get written+ * into latest version segments.** <p>The upgrade process:*@@ -153,7 +153,7 @@ public class UpgradeCoreIndex extends CoreAdminAPIBase {if (indexContainsChildDocs(searcherRef.get())) {throw new SolrException(BAD_REQUEST,- "UPGRADECOREINDEX does not support indexes containing child/nested documents. "+ "UPGRADEINDEX does not support indexes containing child/nested documents. "+ " Consider reindexing your data "+ "from the original source.");}diff --git a/solr/core/src/test/org/apache/solr/handler/admin/UpgradeCoreIndexActionTest.java b/solr/core/src/test/org/apache/solr/handler/admin/UpgradeCoreIndexActionTest.javaindex 536652f270d..3a8e8317126 100644--- a/solr/core/src/test/org/apache/solr/handler/admin/UpgradeCoreIndexActionTest.java+++ b/solr/core/src/test/org/apache/solr/handler/admin/UpgradeCoreIndexActionTest.java@@ -87,7 +87,7 @@ public class UpgradeCoreIndexActionTest extends SolrTestCaseJ4 {admin.handleRequestBody(req(CoreAdminParams.ACTION,- CoreAdminParams.CoreAdminAction.UPGRADECOREINDEX.toString(),+ CoreAdminParams.CoreAdminAction.UPGRADEINDEX.toString(),CoreAdminParams.CORE,coreName),resp);@@ -132,14 +132,14 @@ public class UpgradeCoreIndexActionTest extends SolrTestCaseJ4 {final Set<String> segmentsBeforeUpgrade = listSegmentNames(core);- final String requestId = "upgradecoreindex_async_1";+ final String requestId = "upgradeindex_async_1";CoreAdminHandler admin = new CoreAdminHandler(h.getCoreContainer());try {SolrQueryResponse submitResp = new SolrQueryResponse();admin.handleRequestBody(req(CoreAdminParams.ACTION,- CoreAdminParams.CoreAdminAction.UPGRADECOREINDEX.toString(),+ CoreAdminParams.CoreAdminAction.UPGRADEINDEX.toString(),CoreAdminParams.CORE,coreName,CommonAdminParams.ASYNC,@@ -213,7 +213,7 @@ public class UpgradeCoreIndexActionTest extends SolrTestCaseJ4 {admin.handleRequestBody(req(CoreAdminParams.ACTION,- CoreAdminParams.CoreAdminAction.UPGRADECOREINDEX.toString(),+ CoreAdminParams.CoreAdminAction.UPGRADEINDEX.toString(),CoreAdminParams.CORE,coreName),resp);@@ -360,7 +360,7 @@ public class UpgradeCoreIndexActionTest extends SolrTestCaseJ4 {admin.handleRequestBody(req(CoreAdminParams.ACTION,- CoreAdminParams.CoreAdminAction.UPGRADECOREINDEX.toString(),+ CoreAdminParams.CoreAdminAction.UPGRADEINDEX.toString(),CoreAdminParams.CORE,coreName),resp));@@ -386,7 +386,7 @@ public class UpgradeCoreIndexActionTest extends SolrTestCaseJ4 {admin.handleRequestBody(req(CoreAdminParams.ACTION,- CoreAdminParams.CoreAdminAction.UPGRADECOREINDEX.toString(),+ CoreAdminParams.CoreAdminAction.UPGRADEINDEX.toString(),CoreAdminParams.CORE,coreName),resp);@@ -413,7 +413,7 @@ public class UpgradeCoreIndexActionTest extends SolrTestCaseJ4 {admin.handleRequestBody(req(CoreAdminParams.ACTION,- CoreAdminParams.CoreAdminAction.UPGRADECOREINDEX.toString(),+ CoreAdminParams.CoreAdminAction.UPGRADEINDEX.toString(),CoreAdminParams.CORE,coreName),resp));diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/coreadmin-api.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/coreadmin-api.adocindex 6cd1d566ac2..349ff1e47c4 100644--- a/solr/solr-ref-guide/modules/configuration-guide/pages/coreadmin-api.adoc+++ b/solr/solr-ref-guide/modules/configuration-guide/pages/coreadmin-api.adoc@@ -780,10 +780,10 @@ This command is used as part of SolrCloud's xref:deployment-guide:shard-managemeWhen used against a core in a user-managed cluster without `split.key` parameter, this action will split the source index and distribute its documents alternately so that each split piece contains an equal number of documents.If the `split.key` parameter is specified then only documents having the same route key will be split from the source index.-[[coreadmin-upgradecoreindex]]-== UPGRADECOREINDEX+[[coreadmin-upgradeindex]]+== UPGRADEINDEX-The `UPGRADECOREINDEX` action upgrades an existing core's index in-place after a Solr major-version upgrade by reindexing documents from older-format segments.+The `UPGRADEINDEX` action upgrades an existing core's index in-place after a Solr major-version upgrade by reindexing documents from older-format segments.If a core is upgraded by this action, it ensures index compatibility with the next Solr major version (upon a future Solr upgrade) without having to re-create the index from source.This action is expensive and can take a while to complete on large indexes. Consider running with `async` option in such cases.@@ -797,7 +797,7 @@ Fields that are neither stored nor docValues-backed will lose their data, unlessIt is recommended to test on a copy and have a backup before running on production data.-=== UPGRADECOREINDEX Parameters+=== UPGRADEINDEX Parameters`core`::+@@ -828,7 +828,7 @@ Use <<coreadmin-requeststatus,REQUESTSTATUS>> with the provided `requestid` to pThe update processor chain to use for reindexing.If omitted, Solr uses the chain configured for the `/update` handler, or the default update chain for the core (in that order).-=== UPGRADECOREINDEX Response+=== UPGRADEINDEX ResponseOn success, the response includes:@@ -845,20 +845,20 @@ The number of segments successfully processed.One of `UPGRADE_SUCCESSFUL` or `NO_UPGRADE_NEEDED`.On failure, an exception is thrown with error details.-=== UPGRADECOREINDEX Examples+=== UPGRADEINDEX Examples*Synchronous:*[source,bash]-----http://localhost:8983/solr/admin/cores?action=UPGRADECOREINDEX&core=techproducts+http://localhost:8983/solr/admin/cores?action=UPGRADEINDEX&core=techproducts----*Asynchronous (recommended for large cores):*[source,bash]-----http://localhost:8983/solr/admin/cores?action=UPGRADECOREINDEX&core=techproducts&async=upgrade_1+http://localhost:8983/solr/admin/cores?action=UPGRADEINDEX&core=techproducts&async=upgrade_1----Then poll status:diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.javaindex ad41867cc31..0401de380f1 100644--- a/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java+++ b/solr/solrj/src/java/org/apache/solr/common/params/CoreAdminParams.java@@ -179,7 +179,7 @@ public abstract class CoreAdminParams {CREATESNAPSHOT,DELETESNAPSHOT,LISTSNAPSHOTS,- UPGRADECOREINDEX;+ UPGRADEINDEX;public final boolean isRead;