- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.3k
Description
Overview
Concurrent Segment Search has 3 configuration modes search.concurrent_segment_search.mode for the end user :
- ALL : All search requests use concurrent segment search
- NONE : No search requests use concurrent segment search
- AUTO : Plugins implementing SearchPluginget to decide whether to use concurrent segment search based on the query. In opensearch-project, only KNN and JVector plugin utilize the same.
These can be configured as a Cluster Setting and as an Index setting with the index one taking preference if set.
With OpenSearch 3.0, the default was changed from NONE to AUTO.
This issue tracks the new settings required for IntraSegmentConcurrentSearch and what can be shared with ConcurrentSegmentSearch.
Describe the solution you'd like
IntraSegmentConcurrentSearch can leverage search.concurrent.max_slice_count setting from ConcurrentSegmentSearch which determines the max amount of concurrency a query can use given there are sufficient threads available.
The following new settings would be required for IntraSegmentConcurrentSearch :
- 
search.concurrent_intra_segment.mode: Similar to the one for ConcurrentSegmentSearch but controls whether one segment should be partitioned any further for a search request.
- 
search.concurrent_intra_segment.partition_size: Determines the number of docs in a partition for a segment. It will be used as follows :
if [ LeafReaderContext.reader().maxDocs() >= search.concurrent_intra_segment.partition_size * 2 ] 
    PartitionCount = Math.min( search.concurrent_intra_segment.partition_size, MaxSliceCount )
    Split the segment into PartitionCount partitions 
Else 
     Don't split the segment
To start with, this setting can be present at Cluster and Index level. This will help ensure we don't split very small segments any further.
We should also introduce this as an execution hint. Consider a simple search request V/S a very complex search request ( deeply nested boolean query with many clauses ) over the same index. In the latter case, user would want to lower the value of partition size.
Meta #18852
Related component
Search
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status