How to Overwrite Preview Status Value

In order to overwrite the preview status value, follow these steps:

  1. Navigate to the SmartHub Administration page.

  2. Select the backend for which you want this change.

  3. Click on the "Add New Results Stage" link.

  4. From the dropdown select "Results Scripting Processor".
  5. Provide a name for this pipeline stage.

  6. In the "Referenced Assemblies" section add:

    BAInsight.Longitude.Federator.Runtime

  7. In the "Imported Namespaces" section add:

    BAInsight.Longitude.Federator.Runtime.Misc

  8. In the "Script"section call the SearchResultsHelper.AddFakeMetadata function and modify the PreviewStatusValue to:

    1. 0 - preview exists in the database.

    2. 1 - ignore this document.
    3. 2 - generate preview on demand.

    4. 3 - queued for offline generation.

      Example:

      SearchResultsHelper.AddFakeMetadata(Results,"PreviewStatusValue","0",true,true);

  9. Compile and Save.