How to Overwrite Preview Status Value
To overwrite the preview status value, follow these steps:
- Navigate to the SmartHub administration page at http(s)://<web-app-url>/_admin.
- Select the search engine for which you want this change.
- Click on the "ADD RESULTS TUNING" link.
- From the drop-down menu select "Results Scripting Processor".
- Provide a name for this Tuning 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.AddFakeMetadata
function and modify thePreviewStatusValue
to:- 1 - if you don't want to generate previews for the documents:Example:SearchResultsHelper.AddFakeMetadata(Results,"PreviewStatusValue","1",true,true);
- 2 - Generate preview on demand.Example:SearchResultsHelper.AddFakeMetadata(Results,"PreviewStatusValue","2",true,true);
- 1 - if you don't want to generate previews for the documents:
- Compile and Save.
- Run an iisreset command in order to clear the preview statuses from the cache.