Ingest Add

The Ingest Add method adds a new document to the ingestion target. You can create and ingest a document like this:

       DocInfo doc = new DocInfo(
          task.getTaskConfig(),
          "http://www.example.com/testDocument.doc",
          "testDocument.doc",
          true);
            
       doc.getDoc().addFieldValue("MyField", "My Value");
       doc.getDoc().addFieldValue("SecondField", "First value");
       doc.getDoc().addFieldValue("SecondField", "Second value");
       task.getIngester().add(doc);

The last line sends the document for ingestion. In a typical setup using CFS as the ingestion target, CFS uses File Content Extraction to extract content and additional metadata from the document file. CFS then sends the document to a Content component to be added to the index.

In another setup, the ingestion target could be a connector for a different repository. In this case the Add command adds the document to that repository, using the destination connector's insert action.