NiFi Ingest 25.4
NiFi Ingest

# Re-Ingest Documents that Match a Query

After making changes to your NiFi Ingest dataflow, you might want to re-ingest the documents in your text index. For example, if you add a processing step to perform a new type of media analysis you might want to re-ingest image files.

One approach is to clear the index and the state information stored by your connectors (see Connector Datastores) so that all of the items in your data repositories are ingested again. However, re-ingesting all of your documents can be time consuming. Instead, you can send a query to your Content component and re-ingest documents that match the query.

NOTE: To do this, the connectors you are using must support the synchronize from identifiers feature.

To re-ingest documents that match a query

1. Open the NiFi user interface.

2. Add a QueryIDOL processor to the data flow. This processor queries your Content component and returns documents that match the query.

   1. Drag the processor icon from the components toolbar to the canvas.

      The Add Processor dialog box opens.

   2. Select the QueryIDOL processor and click ADD.

      The processor is added to the canvas.

   3. Right-click the QueryIDOL processor and click Configure.

      The Edit Processor dialog box opens.

   4. Click the Properties tab and set the following properties:

      IDOL License Service | The name of the License Service that you created. See Create a License Service.
      IDOL Host | The host name or IP address of your Content component.
      IDOL ACI Port | The ACI port of your Content component.
      Text Field Text Database Match | These properties set the value of the `Text`, `FieldText`, and `DatabaseMatch` parameters in the `Query` action. Specify a query that returns the documents that you want to re-ingest. For example, to re-ingest PDF files you might set the Field Text property to:
          MATCH{230}:DOCUMENT_KEYVIEW_TYPE_NUMBER

   5. Click the Scheduling tab and in the Run Schedule box, type 1 hour.
   6. Click APPLY.

3. Add a RouteOnAttribute processor to the data flow. This is necessary if your query returns documents that were originally retrieved by different connectors. (Each document must be routed back to the correct connector. The following steps demonstrate how to do this for a File System Connector. To route documents to multiple connectors you would repeat steps 3E to 3G to create additional output relationships).

   1. Drag the processor icon from the components toolbar to the canvas.

      The Add Processor dialog box opens.

   2. Select the RouteOnAttribute processor and click ADD.

      The processor is added to the canvas.

   3. Right-click the RouteOnAttribute processor and click Configure.

      The Edit Processor dialog box opens.

   4. Click the Properties tab.

   5. Click to add a new dynamic property. This creates a new output relationship.

      The Add Property dialog box opens.

   6. In the box, type a name for the output relationship and click OK. For example, to create an output relationship to route documents to a File System Connector, type `FileSystem`.

   7. Set the value of the property. For example, to select documents that were originally retrieved by a NiFi processor named "MyFileSystemConnector":

          ${idol.doc.source:getDelimitedField(2,':'):equals('MyFileSystemConnector')}

      This is NiFi expression language that reads the second part of the `idol.doc.source` FlowFile attribute and checks to see whether the value equals `MyFileSystemConnector`. For more information about this attribute, see Introduction to FlowFiles and Documents.

   8. Click APPLY.
4. Create a connection between the QueryIDOL processor (using the "success" relationship) and the RouteOnAttribute processor.
5. Create a connection between the RouteOnAttribute processor (using the "FileSystem" relationship that you added) and the File System Connector that originally retrieved the files. The connector should retrieve the files and route them into your ingestion pipeline.

6. Start the QueryIDOL and RouteOnAttribute processors.

   The QueryIDOL processor sends the query to the Content component. You should be able to see the query in the Content component request log, which is available through `action=GRL`. Any result documents that were originally retrieved by the File System Connector are routed to the connector for re-ingestion.

Copyright 2018-2025 Open Text
Version 25.4 | Last updated October 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery NiFi Ingest 25.4

Topic Title: Re-Ingest Documents that Match a Query