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: docs/extend/java-filter-plugin.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,10 +165,10 @@ public Collection<Event> filter(Collection<Event> events, FilterMatchListener ma
165
165
166
166
Finally, we come to the `filter` method that is invoked by the Logstash execution engine on batches of events as they flow through the event processing pipeline. The events to be filtered are supplied in the `events` argument and the method should return a collection of filtered events. Filters may perform a variety of actions on events as they flow through the pipeline including:
167
167
168
-
*Mutation — Fields in events may be added, removed, or changed by a filter. This is the most common scenario for filters that perform various kinds of enrichment on events. Inthis scenario, the incoming `events` collection may be returned unmodified since the events in the collection are mutated in place.
169
-
*Deletion — Events may be removed from the event pipeline by a filter so that subsequent filters and outputs do not receive them. Inthis scenario, the events to be deleted must be removed from the collection of filtered events before it is returned.
170
-
*Creation — A filter may insert new events into the event pipeline that will be seen only by subsequent filters and outputs. In this scenario, the new events must be added to the collection of filtered events before it is returned.
171
-
* Observation — Events may pass unchanged by a filter through the event pipeline. This may be useful in scenarios where a filter performs external actions (e.g., updating an external cache) based on the events observed in the event pipeline. Inthis scenario, the incoming `events` collection may be returned unmodified since no changes were made.
168
+
*Mutation-Fields in events may be added, removed, or changed by a filter. This is the most common scenario for filters that perform various kinds of enrichment on events. Inthis scenario, the incoming `events` collection may be returned unmodified since the events in the collection are mutated in place.
169
+
*Deletion-Events may be removed from the event pipeline by a filter so that subsequent filters and outputs do not receive them. Inthis scenario, the events to be deleted must be removed from the collection of filtered events before it is returned.
170
+
*Creation-A filter may insert new events into the event pipeline that will be seen only by subsequent filters and outputs. In this scenario, the new events must be added to the collection of filtered events before it is returned.
171
+
* Observation - Events may pass unchanged by a filter through the event pipeline. This may be useful in scenarios where a filter performs external actions (e.g., updating an external cache) based on the events observed in the event pipeline. Inthis scenario, the incoming `events` collection may be returned unmodified since no changes were made.
172
172
173
173
In the example above, the value of the `source` field is retrieved from each event and reversed if it is a string value. Because each event is mutated in place, the incoming `events` collection can be returned.
0 commit comments