Add a Field to Documents using an Ingest Action
To add a field to all documents retrieved by a fetch task, or all documents sent for ingestion, you can use an Ingest Action.
NOTE: To add a field only to selected documents, use a Lua script (see Run Lua Scripts). For an example Lua script that demonstrates how to add a field to a document, see Add a Field to a Document.
To add a field to documents using an Ingest Action
- Open the connector’s configuration file.
-
Find one of the following sections in the configuration file:
- To add the field to all documents retrieved by a specific fetch task, find the
[TaskName]
section. - To add a field to all documents that are sent for ingestion, find the
[Ingestion]
section.
NOTE: If you set the
IngestActions
parameter in a[TaskName]
section, the connector does not run anyIngestActions
set in the[Ingestion]
section for documents retrieved by that task. - To add the field to all documents retrieved by a specific fetch task, find the
-
Use the
IngestActions
parameter to specify the name of the field to add, and the field value. For example, to add a field namedAUTN_NO_EXTRACT
, with the valueSET
, type:IngestActions0=META:AUTN_NO_EXTRACT=SET
- Save and close the configuration file.