You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/logstash/inputs/elasticsearch.rb
+47-4Lines changed: 47 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -285,10 +285,17 @@ def register
285
285
fill_hosts_from_cloud_id
286
286
setup_ssl_params!
287
287
288
-
@base_query=LogStash::Json.load(@query)
289
-
if@slices
290
-
@base_query.include?('slice') && fail(LogStash::ConfigurationError,"Elasticsearch Input Plugin's `query` option cannot specify specific `slice` when configured to manage parallel slices with `slices` option")
291
-
@slices < 1 && fail(LogStash::ConfigurationError,"Elasticsearch Input Plugin's `slices` option must be greater than zero, got `#{@slices}`")
288
+
if@response_type == 'esql'
289
+
validate_ls_version_for_esql_support!
290
+
validate_esql_query!
291
+
inform_ineffective_esql_params
292
+
else
293
+
# for the ES|QL, plugin accepts raw string query but JSON for others
294
+
@base_query=LogStash::Json.load(@query)
295
+
if@slices
296
+
@base_query.include?('slice') && fail(LogStash::ConfigurationError,"Elasticsearch Input Plugin's `query` option cannot specify specific `slice` when configured to manage parallel slices with `slices` option")
297
+
@slices < 1 && fail(LogStash::ConfigurationError,"Elasticsearch Input Plugin's `slices` option must be greater than zero, got `#{@slices}`")
298
+
end
292
299
end
293
300
294
301
@retries < 0 && fail(LogStash::ConfigurationError,"Elasticsearch Input Plugin's `retries` option must be equal or greater than zero, got `#{@retries}`")
.toraise_error(RuntimeError,/Current version of Logstash does not include Elasticsearch client which supports ES|QL. Please upgrade Logstash to at least 8.17.4/)
0 commit comments