Skip to content

Commit

Permalink
SOLR-13350, SOLR-17298: use multiThreaded=false default; document mul…
Browse files Browse the repository at this point in the history
…tiThreaded parameter; (apache#2596)

Co-authored-by: Gus Heck <[email protected]>
  • Loading branch information
cpoerschke and gus-asf authored Aug 6, 2024
1 parent ba1d2e4 commit 7ebbcd3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 entirely
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ public void process(ResponseBuilder rb) throws IOException {
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 share your feedback and experiences with it on our mailing lists.

== omitHeader Parameter

[%autowidth,frame=none]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7ebbcd3

Please sign in to comment.