This is an automated email from the ASF dual-hosted git repository.

cpoerschke pushed a commit to branch branch_9_7
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9_7 by this push:
     new 365cf8915ee SOLR-13350, SOLR-17298: use multiThreaded=false default; 
document multiThreaded parameter; (#2596)
365cf8915ee is described below

commit 365cf8915ee55ff0660d5e242bc5fdf845573107
Author: Christine Poerschke <[email protected]>
AuthorDate: Tue Aug 6 23:27:23 2024 +0100

    SOLR-13350, SOLR-17298: use multiThreaded=false default; document 
multiThreaded parameter; (#2596)
    
    Co-authored-by: Gus Heck <[email protected]>
    (cherry picked from commit 7ebbcd3493cc5658ad86480906813144125fbc43)
    (cherry picked from commit 84d1fbc45e173b3da268215e77c1c8cf7af84c78)
---
 solr/CHANGES.txt                                               |  2 +-
 .../java/org/apache/solr/handler/component/QueryComponent.java |  2 +-
 .../configuration-guide/pages/configuring-solr-xml.adoc        |  1 +
 .../modules/query-guide/pages/common-query-parameters.adoc     | 10 ++++++++++
 .../src/java/org/apache/solr/common/params/CommonParams.java   |  3 +++
 5 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 963079d2793..a5c81f8d6e0 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -7,7 +7,7 @@ 
https://github.com/apache/solr/blob/main/solr/solr-ref-guide/modules/upgrade-not
 ==================  9.7.0 ==================
 New Features
 ---------------------
-* SOLR-13350: Multithreaded search execution (Ishan Chattopadhyaya, Mark 
Miller, Christine Poerschke, David Smiley, noble)
+* SOLR-13350, SOLR-17298: Opt-in multithreaded search execution (Ishan 
Chattopadhyaya, Mark Miller, Christine Poerschke, David Smiley, noble, Gus Heck)
 
 * SOLR-17192: Put an UpdateRequestProcessor-enforced soft-limit on the number 
of fields allowed in a core.  The 
`NumFieldLimitingUpdateRequestProcessorFactory`
   limit may be adjusted by raising the factory's `maxFields` setting, toggled 
in and out of "warning-only" mode using the `warnOnly` setting, or disabled 
entirely
diff --git 
a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java 
b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
index b7c080ec3b5..3c558feffc3 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
@@ -371,7 +371,7 @@ public class QueryComponent extends SearchComponent {
       return;
     }
 
-    final boolean multiThreaded = params.getBool("multiThreaded", true);
+    final boolean multiThreaded = params.getBool(CommonParams.MULTI_THREADED, 
false);
 
     // -1 as flag if not set.
     long timeAllowed = params.getLong(CommonParams.TIME_ALLOWED, -1L);
diff --git 
a/solr/solr-ref-guide/modules/configuration-guide/pages/configuring-solr-xml.adoc
 
b/solr/solr-ref-guide/modules/configuration-guide/pages/configuring-solr-xml.adoc
index c324600d0ce..6dff9824a73 100644
--- 
a/solr/solr-ref-guide/modules/configuration-guide/pages/configuring-solr-xml.adoc
+++ 
b/solr/solr-ref-guide/modules/configuration-guide/pages/configuring-solr-xml.adoc
@@ -180,6 +180,7 @@ Specifies the number of threads that will be assigned to 
replay updates in paral
 This pool is shared for all cores of the node.
 The default value is equal to the number of processors.
 
+[#indexSearcherExecutorThreads]
 `indexSearcherExecutorThreads`::
 +
 [%autowidth,frame=none]
diff --git 
a/solr/solr-ref-guide/modules/query-guide/pages/common-query-parameters.adoc 
b/solr/solr-ref-guide/modules/query-guide/pages/common-query-parameters.adoc
index 66f7d8ed572..ce6d445bea6 100644
--- a/solr/solr-ref-guide/modules/query-guide/pages/common-query-parameters.adoc
+++ b/solr/solr-ref-guide/modules/query-guide/pages/common-query-parameters.adoc
@@ -400,6 +400,16 @@ If early termination is used, a `segmentTerminatedEarly` 
header will be included
 
 Similar to using <<timeAllowed Parameter,the `timeAllowed` Parameter>>, when 
early segment termination happens values such as `numFound`, 
xref:faceting.adoc[Facet] counts, and result xref:stats-component.adoc[Stats] 
may not be accurate for the entire result set.
 
+== multiThreaded Parameter
+
+[%autowidth,frame=none]
+|===
+|Optional |Default: `false`
+|===
+
+This parameter set to `true` or `false` controls if Solr may use more than one 
thread to satisfy the request.
+A `true` value presently allows the IndexSearcher to search across Lucene's 
segments in parallel, and the 
xref:configuration-guide:configuring-solr-xml.adoc#indexSearcherExecutorThreads[indexSearcherExecutorThreads]
 value can be customised in the `solr.xml` file. This parameter is ignored in 
the presence of `&segmentsTerminateEarly=true` (future work may enable it). 
This is a new parameter and is considered experimental and subject to change or 
removal in subsequent releases. Please shar [...]
+
 == omitHeader Parameter
 
 [%autowidth,frame=none]
diff --git 
a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java 
b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
index 9fca76238b3..4e94b1d97c6 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
@@ -167,6 +167,9 @@ public interface CommonParams {
   /** Timeout value in milliseconds. If not set, or the value is &lt; 0, there 
is no timeout. */
   String TIME_ALLOWED = "timeAllowed";
 
+  /** Whether or not the search may use the multi-threaded logic */
+  String MULTI_THREADED = "multiThreaded";
+
   /**
    * Maximum query CPU usage value in milliseconds. If not set, or the value 
is &lt; 0, there is no
    * timeout.

Reply via email to