Skip to end of metadata
Go to start of metadata

Database collections power the filtered lists in the CMS. You will need to create a new Database Collection for each content type.

Our local version of Funnelback's documentation on this is here: https://wwwsearch.bath.ac.uk:8443/search/admin/help/database_collections.html

1. Create new Database Collection

  1. Click "Create Collection" -> "Database" in the header. This will give you a form to fill in. Use the following values:
    1. Collection Title: CMS <Environment> <Content Type Name>

    2. Email reports to: web-support@bath.ac.uk
    3. Send report email: On failure only
    4. Driver class: oracle.jdbc.OracleDriver
    5. Database URL: jdbc:oracle:thin:@<HOSTNAME>.bath.ac.uk:1521:<DATABASE_NAME>
    6. Username: Funnelback-specific user, as configured for this database
    7. Password: Funnelback-specific user, as configured for this database
    8. SQL Query: Specific query for this content type. Also see the relevant section below.
    9. Primary key column: id

2. Define SQL query

Your SQL query will need to return the id of the row you're retrieving, and also prepend the relevant environment URL to the content_items.url_path field. e.g.

 

3. Edit xml.cfg to map query results to field names

Our local version of Funnelback's documentation on this is here: https://wwwsearch.bath.ac.uk:8443/search/admin/help/xml_cfg.html

The file should start as follows:

 

All other fields you want to display will need to be extracted in the same way and assigned a metadata class (as described in the xml.cfg documentation).

4. Edit template output to display field text in the correct locations

Click 'Design Results Page" on the homepage of your collection's 'Customise' tab. In here, you can use the 'Show data model picker' screen to browse down to /response/results[0]/metaData to see your extracted fields. Clicking on one will give you the correct JSP code to use to reference it in the template language. e.g. <span class="time">${s.result.metaData["W"]}</span>

5. Edit Apache config to use the new collection at your desired URL

You will need to proxy all requests to /content-types/ and /search through to Funnelback. The first set of proxies will be for displaying the lists at the right URLs, the second set is because the default Funnelback click tracking goes through /search before redirecting to the target URL. The below is a full example of this, but the proxying for /search should only need to be done the first time a Funnelback-powered list is set up.

 

 

 

 

 

 

 

1 Comment

  1. The SQL will need to be updated once this story has been rolled out to the servers.