Creating Custom Search Pages

By default, Tripal modules come with a set of search tools.  Each of the Tripal module (e.g. tripal_feature, tripal_stock, tripal_pub, tripal_library, etc.) comes with a set of default searching tools.  The first is a set of search tools for end-users to search for data which can be limited to only show published data.  These tools automatically appear under a 'Search Data' menu of the Navigation menu of Drupal.  The second set of search tools is for administrators.  These administrative search tool appear on the administrative page of each module (e.g. Tripal -> Chado Modules -> Features).  These search tools are meant to allow a site administrator to browse or search through all of the data regardless if it is published or not.    These search tools are provided by as Drupal Views (see the Drupal Views Integration section for more information about Drupal Views).

Using Drupal Views to provide search tools is beneficial because the Drupal View UI interface will allow a site developer to adjust or customize the tool without the need for programming.  The site developer can change the fields for filtering, the columns in the result table, and more.   However, there are times when the functionality of a search form goes beyond the ability of Drupal Views.  For example, if the values for results span multiple Chado tables requiring multiple joins with tables containing large numbers of recrods.  In this case Drupal Views may be too slow.  In these cases, alternative solutions are needed.  This section of the User's Guide provides information for creating custom search tools in ways other than using Drupal Views.  In summary there are three ways this can be done, all of which require some level of programming and familiarity with the Chado database schema.

  1. Use Drupal's site-wide searching interface
  2. Use a combination of materialized views, Drupal Views and template files.
  3. Integrate a 3rd party indexing solution such as Apache Solr or ElasticSearch

The following subsections with provide a discussion for each of these methods.