Class XmlFileCommitter

All Implemented Interfaces:
Committer, Configurable<XmlFileCommitterConfig>, AutoCloseable

Commits documents to XML files. There are two kinds of entries representing document upserts and deletions.

The generated file entries are never updated. Sending a modified document with the same reference (typically unlikely) will create a new entry and won't modify any existing ones. You can think of the generated files as a set of commit instructions.

Generated XML format:

 <docs>
   <!-- Document additions: -->
   <upsert>
     <reference>(document reference, e.g., URL)</reference>
     <metadata>
       <meta name="(meta field name)">(value)</meta>
       <meta name="(meta field name)">(value)</meta>
       <!-- meta is repeated for each metadata fields -->
     </metadata>
     <content>
       (document content goes here)
     </content>
   </upsert>
   <upsert>
     <!-- upsert element is repeated for each additions -->
   </upsert>

   <!-- Document deletions: -->
   <delete>
     <reference>(document reference, e.g., URL)</reference>
     <metadata>
       <meta name="(meta field name)">(value)</meta>
       <meta name="(meta field name)">(value)</meta>
       <!-- meta is repeated for each metadata fields -->
     </metadata>
   </delete>
   <delete>
     <!-- delete element is repeated for each deletions -->
   </delete>
 
}