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
Add `response_type` configuration option to allow processing result of aggregations.
The default `hits` will generate one event per returned document (i.e. "hit"), which is the current behavior.
When set to `aggregations`, a single Logstash event will be generated with the contents of the `aggregations` object of the query's response. In this case the `hits` object will be ignored.
The parameter `size` will be always be set to 0 regardless of the default or user-defined value set in this plugin.
---------
Co-authored-by: MikhailMS <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,6 @@
1
+
## 4.20.0
2
+
- Added `response_type` configuration option to allow processing result of aggregations [#202](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/202)
3
+
1
4
## 4.19.1
2
5
- Plugin version bump to pick up docs fix in [#199](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/199) required to clear build error in docgen. [#200](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/200)
@@ -337,6 +338,20 @@ documentation] for more information.
337
338
When <<plugins-{type}s-{plugin}-search_api>> resolves to `search_after` and the query does not specify `sort`,
338
339
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.
339
340
341
+
[id="plugins-{type}s-{plugin}-response_type"]
342
+
===== `response_type`
343
+
344
+
* Value can be any of: `hits`, `aggregations`
345
+
* Default value is `hits`
346
+
347
+
Which part of the result to transform into Logstash events when processing the
348
+
response from the query.
349
+
The default `hits` will generate one event per returned document (i.e. "hit").
350
+
When set to `aggregations`, a single Logstash event will be generated with the
351
+
contents of the `aggregations` object of the query's response. In this case the
352
+
`hits` object will be ignored. The parameter `size` will be always be set to
353
+
0 regardless of the default or user-defined value set in this plugin.
# This allows you to set the maximum number of hits returned per scroll.
105
111
config:size,:validate=>:number,:default=>1000
106
112
@@ -282,11 +288,6 @@ def register
282
288
fill_hosts_from_cloud_id
283
289
setup_ssl_params!
284
290
285
-
@options={
286
-
:index=>@index,
287
-
:scroll=>@scroll,
288
-
:size=>@size
289
-
}
290
291
@base_query=LogStash::Json.load(@query)
291
292
if@slices
292
293
@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")
Copy file name to clipboardExpand all lines: logstash-input-elasticsearch.gemspec
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Gem::Specification.newdo |s|
2
2
3
3
s.name='logstash-input-elasticsearch'
4
-
s.version='4.19.1'
4
+
s.version='4.20.0'
5
5
s.licenses=['Apache License (2.0)']
6
6
s.summary="Reads query results from an Elasticsearch cluster"
7
7
s.description="This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
0 commit comments