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 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.
- Click on the "Add New Results Stage" link.
- From the dropdown select "Results Scripting Processor".
- 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..
-
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.AddFakeMetadata
function and modify thePreviewStatusValue
to:-
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.