Update ingest jdocs that a null return value will drop the current document. (#40359)

This commit is contained in:
Martijn van Groningen 2019-03-29 09:44:42 +01:00
parent 89837eb918
commit be31800154
No known key found for this signature in database
GPG Key ID: AB236F4FCF2AF12A
2 changed files with 6 additions and 0 deletions

View File

@ -89,6 +89,9 @@ public final class Pipeline {
/** /**
* Modifies the data of a document to be indexed based on the processor this pipeline holds * 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 { public IngestDocument execute(IngestDocument ingestDocument) throws Exception {
long startTimeInNanos = relativeTimeProvider.getAsLong(); long startTimeInNanos = relativeTimeProvider.getAsLong();

View File

@ -39,6 +39,9 @@ public interface Processor {
/** /**
* Introspect and potentially modify the incoming data. * 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; IngestDocument execute(IngestDocument ingestDocument) throws Exception;