Skip to content

Commit be31800

Browse files
committed
Update ingest jdocs that a null return value will drop the current document. (#40359)
1 parent 89837eb commit be31800

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

server/src/main/java/org/elasticsearch/ingest/Pipeline.java

+3
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ public static Pipeline create(String id, Map<String, Object> config,
8989

9090
/**
9191
* Modifies the data of a document to be indexed based on the processor this pipeline holds
92+
*
93+
* If <code>null</code> is returned then this document will be dropped and not indexed, otherwise
94+
* this document will be kept and indexed.
9295
*/
9396
public IngestDocument execute(IngestDocument ingestDocument) throws Exception {
9497
long startTimeInNanos = relativeTimeProvider.getAsLong();

server/src/main/java/org/elasticsearch/ingest/Processor.java

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public interface Processor {
3939

4040
/**
4141
* Introspect and potentially modify the incoming data.
42+
*
43+
* @return If <code>null</code> is returned then the current document will be dropped and not be indexed,
44+
* otherwise this document will be kept and indexed
4245
*/
4346
IngestDocument execute(IngestDocument ingestDocument) throws Exception;
4447

0 commit comments

Comments
 (0)