UI Modern Extra Searches (collection.cfg)

Description

This option allows you to configure a list of extra searches to run in parallel with the main search. This allows you to aggregate search results from multiple collections in a single result page. This setting is effective with the Modern UI only.

Configuring extra searches

This parameter takes a comma-separated list of extra search services to query. Each search service must be configured in a separate configuration file named extra_search.<service name>.cfg.

For example suppose that you want to aggregate the results from the staff_directory and intranet collections when a user searches the documentation collection. To do so you'll need to:

  • Edit the documentation collection.cfg and set ui.modern.extra_searches=staff,intra. The name of the search services doesn't need to match the collection names.
  • Create two new configuration files under $SEARCH_HOME/conf/documentation/: extra_search.staff.cfg and extra_search.intra.cfg
  • In these configuration files, set:
    • collection=[name of the target collection], such as collection=staff_directory or collection=intranet
    • Set any specific query_processor_option in addition to the ones already configured in each collection's collection.cfg.

In your form file you'll then need to use the <@fb.ExtraResults name="[service name]" /> tag to iterate over the results of each extra search source (i.e. <@fb.ExtraResults name="staff" /> or <@fb.ExtraResults name="intra" />). From within this tag you can then use the standard tags:

<@fb.ExtraResults name="staff">
  <@s.Results>
    <#if s.result.class.simpleName != "TierBar">
      ${s.result.title}
      ...
    <p></#if>
  
</@s.Results>

</@fb.ExtraResults>
</p>

Examples

Aggregate two search services in addition to the main search:

ui.modern.extra_searches=staff,intra

See also

top