apache/seatunnel · warning
SQL search_type does not support slicing. slice_max will be…
Error message
SQL search_type does not support slicing. slice_max will be ignored.
What it means
Elasticsearch SQL search_type does not support the slice-based parallelism used by scroll/PIT. If search_type=sql and slice_max > 1, the connector logs this warning and resets sliceMax to 1, so the reader will not be parallelized by slicing.
Solutions
- Remove slice_max or set it to 1 when using search_type=sql
- Switch search_type to scroll/pit if parallel slicing is needed and the query allows
- Accept single-threaded SQL reading
Example fix
// before search_type = "sql" slice_max = 5 // after search_type = "sql" # slice_max removed // or for parallelism: search_type = "pit" slice_max = 5
Defensive patterns
Strategy: validation
Validate before calling
// fail fast on incompatible combination
if ("sql".equals(config.getString("search_type")) && config.getInt("slice_max", 1) > 1) {
throw new IllegalArgumentException("slice_max is not supported with search_type=sql");
} Prevention
- Only set slice_max for scroll/pit search types
- Don't reuse slice_max across search_type variants in templates
- Verify expected reader parallelism after switching search_type
When it happens
Trigger: Setting search_type = "sql" together with slice_max > 1 in the Elasticsearch source config.
Common situations: Users expecting SQL queries to be parallel like scroll/PIT reads; leftover slice_max from a config template.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- SQL search_type does not support slicing. slice_max will be…
- Elasticsearch Source config warn: when both 'index' and…
- ILLEGAL_CONFIG_ARGUMENT
- Invalid runtime field configuration
- The schema config in ElasticSearch source/sink is…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/47e23d2f6c393657.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-elasticsearch/src/main/java/org/apache/seatunnel/connectors/seatunnel/elasticsearch/source/ElasticsearchSource.java:176
sourceType,
null));
}
catalogTable =
CatalogTable.of(
TableIdentifier.of("elasticsearch", null, index),
builder.build(),
Collections.emptyMap(),
Collections.emptyList(),
"");
}
SearchTypeEnum searchType = readonlyConfig.get(SEARCH_TYPE);
SearchApiTypeEnum searchApiType = readonlyConfig.get(SEARCH_API_TYPE);
String sqlQuery = readonlyConfig.get(ElasticsearchSourceOptions.SQL_QUERY);
String scrollTime = readonlyConfig.get(ElasticsearchSourceOptions.SCROLL_TIME);
int scrollSize = readonlyConfig.get(ElasticsearchSourceOptions.SCROLL_SIZE);
int sliceMax = readonlyConfig.get(ElasticsearchSourceOptions.SLICE_MAX);
if (SearchTypeEnum.SQL.equals(searchType) && sliceMax > 1) {
log.warn("SQL search_type does not support slicing. slice_max will be ignored.");
sliceMax = 1;
}
long pitKeepAlive = readonlyConfig.get(ElasticsearchSourceOptions.PIT_KEEP_ALIVE);
int pitBatchSize = readonlyConfig.get(ElasticsearchSourceOptions.PIT_BATCH_SIZE);
// Parse runtime fields configuration
Map<String, Object> runtimeFields = null;
if (readonlyConfig.getOptional(ElasticsearchSourceOptions.RUNTIME_FIELDS).isPresent()) {
runtimeFields =
parseRuntimeFields(
readonlyConfig.get(ElasticsearchSourceOptions.RUNTIME_FIELDS));
}
ElasticsearchConfig elasticsearchConfig = new ElasticsearchConfig();
elasticsearchConfig.setSource(source);
elasticsearchConfig.setCatalogTable(catalogTable);
elasticsearchConfig.setQuery(query);View on GitHub (pinned to cf67b549a7)