This is an automated email from the ASF dual-hosted git repository.
cpoerschke pushed a commit to branch branch_9_8
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9_8 by this push:
new 30c211cf480 SOLR-17686: Rename SearchHandler.stageInEnglish to
stageToString and make it protected and non-static (#3224)
30c211cf480 is described below
commit 30c211cf480a9e1c447336249759baff042063ad
Author: Jeanie Lam <[email protected]>
AuthorDate: Mon Mar 3 14:35:21 2025 +0000
SOLR-17686: Rename SearchHandler.stageInEnglish to stageToString and make
it protected and non-static (#3224)
(cherry picked from commit e668dceb6bec0b838d5f1e045483432abd6b6612)
(cherry picked from commit c3a2f37afa2572fb6b486a0a38cec8291263e241)
---
.../java/org/apache/solr/handler/component/SearchHandler.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git
a/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java
b/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java
index 585b6e9a5c2..1fb8cbc6855 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java
@@ -657,7 +657,7 @@ public class SearchHandler extends RequestHandlerBase
for (SearchComponent c : components) {
if (checkLimitsBefore(
c,
- "handleResponses next stage:" + stageInEnglish(nextStage),
+ "handleResponses next stage:" + stageToString(nextStage),
rb.req,
rb.rsp,
components)) {
@@ -671,7 +671,7 @@ public class SearchHandler extends RequestHandlerBase
for (SearchComponent c : components) {
if (checkLimitsBefore(
- c, "finishStage stage:" + stageInEnglish(nextStage), rb.req,
rb.rsp, components)) {
+ c, "finishStage stage:" + stageToString(nextStage), rb.req,
rb.rsp, components)) {
return;
}
c.finishStage(rb);
@@ -711,9 +711,9 @@ public class SearchHandler extends RequestHandlerBase
return true;
}
- private static String stageInEnglish(int nextStage) {
+ protected String stageToString(int stage) {
// This should probably be a enum, but that change should be its own
ticket.
- switch (nextStage) {
+ switch (stage) {
case STAGE_START:
return "START";
case STAGE_PARSE_QUERY:
@@ -728,8 +728,7 @@ public class SearchHandler extends RequestHandlerBase
case STAGE_DONE:
return "FINISHING";
default:
- throw new SolrException(
- SolrException.ErrorCode.SERVER_ERROR, "Unrecognized stage:" +
nextStage);
+ return "CUSTOM_STAGE_" + String.valueOf(stage);
}
}