Skip to main content
Skip table of contents

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:

  1. Edit Discovery Server’s Web.config file by updating the SearchableFieldEnabled key. Set the value=”true”

    Searchable key
  2. Save

  3. 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’.

  1. Open Visualizer

  2. Copy the following script into the Dev Tools in Visualizer

    CODE
    POST /shiny/_update_by_query?conflicts=proceed
    {
      "script": {
        "source": "ctx._source.searchable = params.searchable",
        "lang": "painless",
        "params": {
          "searchable": true
        }
      },
      "query": {
        "match": {
          "_id": "cbbe97d86d5f5768093cfc4615c1e0e643ba4e47"
        }
      }
    }
  3. Enter the ID of the item you want to tag in the id field (line 12)

  4. Items with the searchable field set to "true" (line 7), will appear in search results.

  5. Items with the searchable field set to "false" (line 7), will NOT appear in search results and will return the following message:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.