docs/index.asciidoc in logstash-input-elasticsearch-4.18.0 vs docs/index.asciidoc in logstash-input-elasticsearch-4.19.0

- old
+ new

@@ -116,10 +116,11 @@ | <<plugins-{type}s-{plugin}-proxy>> |<<uri,uri>>|No | <<plugins-{type}s-{plugin}-query>> |<<string,string>>|No | <<plugins-{type}s-{plugin}-request_timeout_seconds>> | <<number,number>>|No | <<plugins-{type}s-{plugin}-schedule>> |<<string,string>>|No | <<plugins-{type}s-{plugin}-scroll>> |<<string,string>>|No +| <<plugins-{type}s-{plugin}-search_api>> |<<string,string>>, one of `["auto", "search_after", "scroll"]`|No | <<plugins-{type}s-{plugin}-size>> |<<number,number>>|No | <<plugins-{type}s-{plugin}-slices>> |<<number,number>>|No | <<plugins-{type}s-{plugin}-ssl_certificate>> |<<path,path>>|No | <<plugins-{type}s-{plugin}-ssl_certificate_authorities>> |list of <<path,path>>|No | <<plugins-{type}s-{plugin}-ssl_cipher_suites>> |list of <<string,string>>|No @@ -331,10 +332,13 @@ * Default value is `'{ "sort": [ "_doc" ] }'` The query to be executed. Read the {ref}/query-dsl.html[Elasticsearch query DSL documentation] for more information. +When <<plugins-{type}s-{plugin}-search_api>> resolves to `search_after` and the query does not specify `sort`, +the default sort `'{ "sort": { "_shard_doc": "asc" } }'` will be added to the query. Please refer to the {ref}/paginate-search-results.html#search-after[Elasticsearch search_after] parameter to know more. + [id="plugins-{type}s-{plugin}-request_timeout_seconds"] ===== `request_timeout_seconds` * Value type is <<number,number>> * Default value is `60` @@ -374,9 +378,22 @@ * Default value is `"1m"` This parameter controls the keepalive time in seconds of the scrolling request and initiates the scrolling process. The timeout applies per round trip (i.e. between the previous scroll request, to the next). + +[id="plugins-{type}s-{plugin}-seearch_api"] +===== `search_api` + +* Value can be any of: `auto`, `search_after`, `scroll` +* Default value is `auto` + +With `auto` the plugin uses the `search_after` parameter for Elasticsearch version `8.0.0` or higher, otherwise the `scroll` API is used instead. + +`search_after` uses {ref}/point-in-time-api.html#point-in-time-api[point in time] and sort value to search. +The query requires at least one `sort` field, as described in the <<plugins-{type}s-{plugin}-query>> parameter. + +`scroll` uses {ref}/paginate-search-results.html#scroll-search-results[scroll] API to search, which is no longer recommended. [id="plugins-{type}s-{plugin}-size"] ===== `size` * Value type is <<number,number>>