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".
- YAML
- JSON
- XML
handler:
class: Reject
message: No usable title
{
"handler": {
"class": "Reject",
"message": "No usable title"
}
}
<handler class="Reject">
<message>No usable title</message>
</handler>
Usage
Full configuration skeleton, with every option and its default
- YAML
- JSON
- XML
class: Reject
label: string
message: string
{
"class": "Reject",
"label": "string",
"message": "string"
}
<handler>
<class>Reject</class>
<label>string</label>
<message>string</message>
</handler>
Properties
| Property | Type | Required | Default |
|---|---|---|---|
label | string | No | - |
message | string | No | - |
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.