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 The search engine your SmartHub instance uses to perform queries. SmartHub can be configured to use more than one search engine. 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 Pipeline stages offer uniformity to the end user. Various functions include mapping names and values to match local refinements..

  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.