Skip to main content

Reject

Rejects a document from further processing

Notes

The Reject handler in the Importer's [flow-control] configuration immediately removes documents from processing. It is commonly used within logic blocks (if/then/else) to exclude documents that don't meet conditions like date ranges, field values, or metadata patterns. When triggered, the handler discards the document, halting further processing.

The handler logs a custom rejection message if provided; otherwise, it logs the rejection condition or defaults to its class name.

Examples

Stops processing the document and drops it from the crawl. Usually the then branch of an If, as in "if the title is blank, reject".

handler:
class: Reject
message: No usable title

Usage

Full configuration skeleton, with every option and its default
class: Reject
label: string
message: string

Properties

PropertyTypeRequiredDefault
labelstringNo-
messagestringNo-

Property Details

label

An optional, user-supplied label for this step in the importer pipeline. It has no effect on processing — it exists purely to help identify this step, for example in large configurations or in the visual configurator.

message

Text logged as the reason for the rejection. Without it the log names the condition that triggered the rejection, or the handler itself. Worth setting when several Reject handlers can fire, so the log says which rule dropped the document.