Apache Solr open-source search software
SOLR-13350, SOLR-17298: use multiThreaded=false default; document multiThreaded parameter; (#2596)
Christine Poerschke7ebbcd3493cc
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex f7c8fa4d9ae..791094f6b65 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -130,7 +130,7 @@ Other Changes================== 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 entirelydiff --git a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.javaindex 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.adocindex 3f865cf4100..fcec13bef61 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@@ -178,6 +178,7 @@ Specifies the number of threads that will be assigned to replay updates in paralThis 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.adocindex b058483724a..80e92f48289 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 includedSimilar 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 share your feedback and experiences with it on our mailing lists.+== 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.javaindex 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 < 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 < 0, there is no* timeout.