Facet searches are a very powerful way of publishing databases, providing a guided search which does not require knowledge of the structure and content of the database. They’re widely used in shopping websites to guide you through a catalogue of tens of thousands of options, where they progressively filter out options and offer new filter options as a function of the filters already applied.

Heurist has the unique ability not only to run these sort of filters but to allow filtering based on the characteristics of other records linked through several relationship steps. For example, in a theatre performance database you could find all theatres which hosted plays which featured actor(s) born in Stratford. This sort of multi-level query would normally require the writing of obscure SPARQL queries in a triple store or multiple levels of SQL queries in a relational database; in Heurist it can be set up in a couple of minutes by clicking through a simple selection wizard.

While we’ve had facet searches for some years, work on the Beyond 1914 and Expert Nation projects in particular has led us to make facet searches much more customisable and instantly embeddable into third party websites such as WordPress. The result can be seen in the customisation of searches on the Beyond 1914, Expert Nation and Digital Harlem websites featured in our Projects page; the code required to embed a search in a web page is immediately available by right-clicking on any saved search (see below).

Facet Search

Adding a Facet Search

You will find facet searches on the left side of the main Filter-Analyse-Publish screen (see screenshot above). You can add filters and searches under any of the headings on the left, such as “My Filters” (as shown above), or within the workgroups below. Those saved under “My Filters” will only be visible to you, whereas those saved under the respective workgroup will be visible to all members of that workgroup. In order to add a new Facet Search, mouse over the area where you want it to to be listed and right click on the 3 parallel white lines which appear on the right. Right clicking will drop down a menu as above. Select the “New Faceted” option with the Facet Search Icon icon. This will open a popup screen which will ask you to select the entity (record) type on which you want the search to be based. A default name is given to the search, but this can be altered as necessary for clarity. You also have the option of selecting which workgroup you would like the search to be saved under. “Advanced” options allow you to set a Preliminary filter and Expansion rules; and if the search is to be used in a website, then the “Public interface” heading allows one to set a title for the search in the user interface, as well as decide (via a checkbox) whether or not to display the full set of records before the facet selection occurs. This can be useful if you wish people to interactively narrow down their focus on the information on a website.

Facet Search Field Select

Selecting fields

As one starts to define the facet search, the next screen offers the option of including linked-from record types – with reverse pointers, indicated by << – as well as the records that are pointed to, which are shown with a blue arrow. In some circumstances it can be useful to expand the search options in both directions, showing records that point to one’s base entity, as well as records that the base entity points to. If these bi-directional relationships are desired to be included in the search then check the box next to “Show linked-from record types”. Clicking on the blue arrow next to records that are pointed to will drop down a list of their fields for inclusion in the search parameters, with their pointer fields also displayed as blue arrows that can be selected, etc. It is possible to build a deep, nested tree of fields for inclusion in the search. The act of defining these searches can inform research questions that were previously not considered, as one starts to explore the relationships within one’s data.

Facet Search Display Options

Setting Display Options

Once one has selected fields, one can choose how the fields will be displayed in the search (see above) – as a list, as wrapped text, as a search where the user enters text, as a dropdown list or as a slider (the latter is used for numbers and dates). One can change the order of the fields to affect the display of the facet search. This allows one to guide users through their search by putting the more generic fields at the top and then more specific ones lower down, or encourage users to focus in particular areas by putting those fields first. The type of search will vary according to the nature of both the data and the way that the search will be used. For example, one might wish to allow people to enter text when searching on Family Name in a database of historic soldiers, but one might give them a list of the names of Companies of Players in a theatre performance database. Dropdowns are primarily useful if they are short. For fields where the list of dropdown terms is very long a list or wrapped text may be more appropriate. The final screen in the facet search is a preview, allowing one to see what the final search will look like. One can then use the Back and Next buttons to go backwards and forwards tweaking the search display until it matches your expectations. Once the faceted search is saved, right-clicking it and choosing Embed: Embed Icon from the dropdown menu will provide you with both a URL and the code to embed the search in a webpage.

Heurist facet search embedded in the ExpertNation WordPress website

Heurist facet search embedded in the ExpertNation WordPress website