Synchronize

This action searches a repository for document updates and sends the updates to an Ingestion module.

http://host:port/action=Fetch&FetchAction=Synchronize
					[&Config=Base64_Config]
					[&TaskSections=Section_CSV]
					[&IngestActions=Document_Action_CSV]

Type: Asynchronous

Parameter Name Description
Config (Optional) Base64 encoded configuration file. If this parameter is specified, the configuration parameters override those in the connector’s configuration file.
TaskSections (Optional) The names of the task sections to use to perform synchronization. If this parameter is unspecified, all configured task sections are used.
IngestActions

(Optional) Actions to perform on documents before they are ingested. This can be a list of document actions of the form action:parameters. Actions are processed from left to right. The available documents actions are:

  • META. Add a custom field to the document, specified as META:Fieldname=FieldValue
  • LUA. Run a Lua script on the document, specified as LUA:Luascript.

Example: To add a field CATEGORY=FILESYSTEM to every document, specify the ingest action as:

IngestActions=META:CATEGORY=FILESYSTEM

Any commas in the action parameters should be escaped with a backslash (\). For example:

IngestActions=META:field=one\,two\,three,META:anotherfield=four

Example

http://host:port/action=Fetch&FetchAction=Synchronize

Response

A sample response appears below. In this example, two tasks were performed as part of the synchronize (DIR1 and DIR2). Both of these found 10 new documents, but ingestion failed for all 20 documents.

<action>
  <documentcounts>
    <documentcount
      added="10"         collected="0"       deleted="0"
      errors="0"         holds="0"           ingestadded="0"
      ingestdeleted="0"  ingestfailed="10"   ingestupdated="0"
      inserted="0"       releasedholds="0"   seen="10"
      task="DIR1"        unchanged="0"       updated="0" />
   <documentcount
      added="10"         collected="0"       deleted="0"
      errors="0"         holds="0"           ingestadded="0"
      ingestdeleted="0"  ingestfailed="10"   ingestupdated="0"
      inserted="0"       releasedholds="0"   seen="10"
      task="DIR2"        unchanged="0"       updated="0"
  </documentcounts>
  <fetchaction>SYNCHRONIZE</fetchaction>
  <tasks>
    <success>DIR1</success>
    <success>DIR2</success>
  </tasks>
  <token>MTAuMi4xMDUuMzQ6MTIzNDpGRVRDSDoxNDAyOTU3MzY4</token>
  <status>Finished</status>
  <queued_time>2009-Oct-15 14:44:32</queued_time>
  <time_in_queue>0</time_in_queue>
  <process_start_time>2009-Oct-15 14:44:32</process_start_time>
  <time_processing>3</time_processing>
  <process_end_time>2009-Oct-15 14:44:35</process_end_time>
</action>

If a synchronize task does not complete successfully, the task name appears between <failed> tags and a message explains the reason for the failure:

<tasks>
   <failed message="Error message">MyTask1</failed>
</tasks>

© 2014 Hewlett-Packard Development Company, L.P.