Skip to content

Update ingest java docs that a null return value will drop the current document #40359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions server/src/main/java/org/elasticsearch/ingest/Pipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ public static Pipeline create(String id, Map<String, Object> config,

/**
* Modifies the data of a document to be indexed based on the processor this pipeline holds
*
* If <code>null</code> is returned then this document will be dropped and not indexed, otherwise
* this document will be kept and indexed.
*/
public IngestDocument execute(IngestDocument ingestDocument) throws Exception {
long startTimeInNanos = relativeTimeProvider.getAsLong();
Expand Down
3 changes: 3 additions & 0 deletions server/src/main/java/org/elasticsearch/ingest/Processor.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public interface Processor {

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

Expand Down