This reproduces a documentation bug in elastic/logstash-docs#2102.
The ES|QL example in docs/plugins/filters/elasticsearch.asciidoc sets query and
query_params but never sets query_type. The plugin defaults query_type to
"dsl" (source),
and in DSL mode it rejects query_params outright at registration
(source).
So the documented example, copied verbatim, aborts pipeline startup. The check
runs in register before test_connection!, so no Elasticsearch is needed
to reproduce it.
chmod +x run.sh
./run.shRequires Docker. The script installs logstash-filter-elasticsearch v4.4.1 (the
version the 9.5 docs pin) into a Logstash 8.17.4 container and runs two pipelines.
bad.conf (the doc example verbatim) fails at startup:
LogStash::ConfigurationError: `query_params` is not allowed when `query_type => 'dsl'`.
logstash-filter-elasticsearch-4.4.1/lib/logstash/filters/elasticsearch.rb:453:in `validate_query_settings'
...:440:in `validate_dsl_query_settings!'
...:199:in `register'
good.conf (same config + query_type => "esql") gets past validation and
only fails later at test_connection! because the ES host is fake:
Elastic::Transport::Transport::Error: Connect to localhost:9200 ... Connection refused
logstash-filter-elasticsearch-4.4.1/lib/logstash/filters/elasticsearch.rb:407:in `test_connection!'
...:210:in `register'
The error moving from line 453 (validation) to line 407 (connection) when only
query_type => "esql" is added is the proof: the missing query_type is what
breaks the documented example.
Add query_type => "esql" to the example in the docs, and state that it's
required for ES|QL queries.
The stock docker.elastic.co/logstash/logstash:8.17.4 image ships a
logstash-filter-elasticsearch that fails to load on its own
(LoadError: elasticsearch/transport/transport/http/manticore). That's a
separate image-packaging issue; run.sh sidesteps it by installing v4.4.1.