How to Overwrite Preview Status Value
In order to overwrite the preview status value, follow these steps:
- Navigate to the SmartHub Administration page.
- Select the backend for which you want this change.
- Click on the "Add New Results Stage" link.
- From the dropdown select "Results Scripting Processor".
- Provide a name for this pipeline stage.
-
In the "Referenced Assemblies" section add:
BAInsight.Longitude.Federator.Runtime -
In the "Imported Namespaces" section add:
BAInsight.Longitude.Federator.Runtime.Misc -
In the "Script"section call the
SearchResultsHelper.AddFakeMetadatafunction and modify thePreviewStatusValueto:-
0 - preview exists in the database.
- 1 - ignore this document.
-
2 - generate preview on demand.
-
3 - queued for offline generation.
Example:
SearchResultsHelper.AddFakeMetadata(Results,"PreviewStatusValue","0",true,true);
-
- Compile and Save.