Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Content reprocessing is a key feature of StageRSTageR It provides the ability to execute content processing pipelines over content that is already stored in a storage unit. Reprocessing is done at the scope level of a storage unit.

Records can be reprocessed through the reprocess API calls which allow for single key, multiple key and whole scope reprocessing. Items selected for reprocessing are put in a queue that is then consumed by reprocessing worker processes. Multiple reprocessing workers can be configured for a single installation.

Reprocessing will execute the content processing modules configured for the specified scope of the key(s).


To configure reprocessing, specify reprocessQueue properties under reprocessQueue (batchSize: number of documents to process as a batch, querySize: number of records by reprocess worker to retrieve at a time, timeout: wait timeout when there are no items in the queue) and define the number of reprocessing workers on the StageR configuration STageR configuration file:

Code Block
languagetext
themeRDark
{
  ...,
  reprocessQueue: {
    batchSize: 20,
    querySize: 40,
    timeout: 5000
  },
  workers: {
    restapi: 1,
    reprocess: 4,
    replication: 1
  },
  ...
}

Specify the content processing modules, for the scope to be reprocessed, using the admin/setContentProcessingModules API call:

Code Block
languagetext
themeRDark
POST admin/setContentProcessingModules/STORAGE_UNIT
{
    "modules" : {
        "connector": [
            {
                "settings" : {
                    "solr-collection" : "testcollection"
                },
                "module" : "SolrPublisher"
            }
        ]
    },
    "settings" : {
        "solr-hosts" : localhost:8983"
    }
}

Enable the reprocessing queue at the storage unit level. This will register the storage unit to be scanned by the reprocess workers.

Code Block
languagetext
themeRDark
PUT admin/enableReprocessingQueue/STORAGE_UNIT/true

Automatic Updates

When foreign keys are defined for a content record and the ForeignKeyJoin processing module is defined for a storage unit, a foreign key lookup table is created in StageR STageR which allows the foreign item to know which primary items are referencing it, allowing for any updates to the foreign item to trigger an automatic update (send the keys to reprocess) of the primary keys.

As long as the reprocessing queue for the primary item's storage unit is enabled and there are reprocessing workers configured, automatic updates will be triggered.