Skip to main content

Customizing global search

Global search allows your subscribers to search for content across the entire application.

Read about configuration files

Ministra Pro end-user applications comes with pre-configured search settings that include IPTV channels, EPGs and VOD. You can modify the configuration settings to customize the user experience.

The following files store the configuration settings for global search:

  • var/www/ministra_middleware/config/global_search/default.yaml
    The file includes limits for autocomplete and search history, and sections that divide the search results in a meaningful way, for example, films, series, or channels.

    tip

    In the same location, Ministra Pro provides the sample.yaml file that includes the configuration settings as a template that you can copy into the main default.yaml file.

  • var/www/ministra_middleware/conf.d/custom/global_search.ini
    The file includes Elasticsearch configuration, the index name, and search history limits.

To customize global search settings

  1. In the the default.yaml file, modify the following settings:

    • To change the sections that group search results, for each section, modify the following line:

      searchConfig: sections: -id:

      Each instance of -id introduces a new section. The following example is a section exclusively for series:

      -id: series-all
      name:
      en: Series
      navigate:
      label:
      en: See more
      externalUrl: http://netflix.com/cat/2
      cardViewType: adaptive
      provider:
      params:
      contentType: series

      Use the sample.yaml file for reference.

    • To change the limit of autocomplete predictions, modify the following line:

      autocomplete: defaultlimit: X
      • X is the maximum number of predictions.
    • To change the limit of search history entries that the application displays, modify the following line:

      history: defaultlimit: X
      • X is the maximum number of entries.
  2. In the global_search.ini file, modify the following settings:

    • To change the name Elasticsearch connection settings, modify the following line:

      global_search[elastic_search_url] = "http://000.0.0.0:0000"
      • "http://000.0.0.0:0000" is the URL of the server hosting the Elasticsearch instance.
    • To change the name of the search index, modify the following line:

      global_search[index_name] = "global_search"
      • "global_search" is the name of the index.
    • To change the limit of search history entries that Elasticsearch stores (per user), modify the following line:

      global_search[history_max_items_for_initiator] = X
      • X is the maximum number of entries.
  3. Save and close the files.