Limit Discoverable Items
With Discovery Server, you are able to filter which search results are available to be freely viewed by all end-users and, conversely, which search results should never be displayed to end-users.
Instructions
To turn this feature on:
Edit Discovery Server’s Web.config file by updating the SearchableFieldEnabled key. Set the value=”true”
Save
Restart (Stop and Start) Discovery Server in IIS
To ensure an item will appear in Discovery Server search results, the item must be tagged as 'searchable’.
Open Visualizer
Copy the following script into the Dev Tools in Visualizer
CODEPOST /shiny/_update_by_query?conflicts=proceed { "script": { "source": "ctx._source.searchable = params.searchable", "lang": "painless", "params": { "searchable": true } }, "query": { "match": { "_id": "cbbe97d86d5f5768093cfc4615c1e0e643ba4e47" } } }
Enter the ID of the item you want to tag in the id field (line 12)
Items with the searchable field set to "true" (line 7), will appear in search results.
Items with the searchable field set to "false" (line 7), will NOT appear in search results and will return the following message: