Search Implementation

Preamble: Here are some basic notes about the way search is implemented in the WMS.

Modules involved

The main module, mcgill_search, featurizes some configuration for use with the McGill implementation of the Google Search Appliance, an Apache solr implementation, and contains hooks and front-end resources to manage the menus and the styling of the McGill search experience and depends on the Search API module to bring it all together.

Experience

McGill Search overrides the default Drupal search in favour of a two-pronged approach to search: Apache solr handles searching the local site (www.mcgill.ca/<siteX>), while the GSA handles McGill-wide searches. Each of these services, when successfully queried, return results to the local site, which then handles such things as facets, theming the search results and auto-complete features of the search form. The theming of mcgill_search is handled by some front-end resources (SASS/CSS, JS) as well as two custom template files: 'page-search' and 'search'. The overall styling of the page is also complemented by the default McGill-wide theme 'Moriarty'. Every site with search enabled thereby has a uniform experience that is mainly controlled at the module level, but can be, only when necessary, overridden by a theme.

McGill Search also utilizes two blocks (one for solr and one for the GSA) that can be placed anywhere on a site. Some hooks will override these search forms however, for instance, if a site doesn't have solr enabled or the amount of content on that site suggests a local solr search wouldn't be fruitful (i.e., less than X nodes) that search form will redirect to a McGill-wide search (GSA).

Tags: 
Back to top