A back arrow icon.
RDFox Blog

RDFox Faceted Search

RDFox Faceted Search
Amardeep Bhattal

RDFox harnesses the ability to serve extensions to built-in functionality, and Faceted Search takes full advantage of this.

Faceted Search enables the navigation of graph data via a successive refinement approach, which is similar in principle to e-commerce websites, where the available products may be filtered by applying a series of constraints. For example, on a website selling televisions the variety of televisions available for purchase may be refined down to a small set by stipulating the screen-size, then the manufacturer, and then a feature such as 4K resolution.

However, although Faceted Search enables such refinement, it is not limited to a pre-defined set of properties, and is also graph-aware. This enables filters to be applied not just to top-level properties of objects in a graph, but to the properties of objects that are the targets of the top-level properties, and in turn down the entire hierarchy of properties and objects.

How to Use Faceted Search in RDFox

Faceted Search shows the results of applying a set of filters to the data in a graph, and is oriented around guiding the user to produce a set of results, and so removes options and selections that are contradictory.

The first filter allows the selection of a set of types, which defines a set of valid objects. The properties available from this set of objects define the next level of filterable properties.

This second level may be filtered by choosing any available property or properties desired, and selecting the allowed values for the objects that are the targets of these properties. This process may carry on to any depth desired.

The allowed values within a filter for a given property are alternatives, and so are OR-ed together (the property may take any of the selected values).

The set of filters for properties at the same level are AND-ed together (filters on different properties must all be satisfied to produce results).

In this way we could choose, say, Person as the only top-level type allowed, and the residesInCountry property to have values UK or Germany or USA, and the dateOfBirth property to be greater than 1950–01–01. This selection equates to “find me all people who reside in the UK or Germany or the USA, who were also born after the 1st January 1950”.

An example of following a property hierarchy is to choose Person as the top-level type, and not to specify a direct value for the residesInCountry property. Instead the value France could be specified for the hasBorderWith property nested under residesInCountry. This selection equates to “find me all people who were born in a country that has a border with France”.

Faceted Search — nested properties
Faceted Search — nested properties

Finally, more complex queries may be constructed by selecting values at different levels. The allowed values within a filter for a given property, and the set of any nested property filters are OR-ed together (any of the selected values, or something that satisfies all the property filters).

An example would be to find people who reside in the USA, or in some country that has a border with France.

The first image in this article shows another such query, where values are selected at different levels.

Faceted Search Interface

Faceted Search allows the selection of filter values either individually via checkboxes, or if numeric or a date, via a slider or date range picker. These range elements are only shown if there are three or more values.

Faceted Search — slider feature
Faceted Search — slider feature
Faceted Search — date picker feature
Faceted Search — date picker feature

When initially loaded, the user is prompted to choose a datastore in the associated RDFox instance by typing a datastore name into a dialog box. To subsequently switch to a different datastore, click on the “Options” link to open the dialog box again.

Faceted Search Queries

In order to avoid excessive data being held in the browser, the number of types, number of properties at any given depth, and number of values for each property are limited. If this limit is reached, a warning is shown. Range limits are derived from the values in the loaded data.

Once a selection is made, Faceted Search issues a SPARQL query to RDFox to obtain the results displayed. This query is over all data held in RDFox in the chosen datastore, though also with a limit on the number of results to prevent excessive amounts of data being passed to the browser and again, if this limit is reached a warning is shown. The query may be shown in the RDFox console by clicking on the “SPARQL” link above the results in the Faceted Search interface.

Faceted Search — generated SPARQL query
Faceted Search — generated SPARQL query

Installation RDFox Faceted Search

The Faceted Search console extension requires an RDFox v3.1.0 or later installation.

To add Faceted Search to RDFox, download the Faceted Search console extension zip (RDFox v4.0.0 or later or RDFox v3.x). Unzip it, and place the resulting directory (which should be called “fsearch”) into a directory named “console-extensions” in an RDFox server directory. The Faceted Search directory name should not be changed from “fsearch” to a different value.

For example, on macOS or linux a possible location is,


or on Windows a possible location is,


See the RDFox documentation at docs.oxfordsemantic.tech for more details on specifying alternative server directory locations when using RDFox.

Once the RDFox server is started, and the endpoint started, Faceted Search is available at the /console-extensions/fsearch/ path. For example, if using a local machine and the default RDFox endpoint port:


Faceted Search with RDFox

As you can see, Faceted Search is an incredibly valuable tool that has its place in just about every human-facing application. Everywhere you look you’ll see it implemented, but with RDFox driving the process, more complex filters can be applied and results are returned in real time. More than just complex queries, RDFox offers a deeper insight into the data and therefore the query, as a result of its inherently capable reasoning.  With RDFox, Faceted Search provides the whole package—a truly intuitive, seamless user experience.

Further examples

For more information on how faceted search could be harnessed by e-commerce sites, read our article about how dynamic website navigation can be used to find the perfect coffee.

To find out how RDFox can power faceted search for your business, contact us at info@oxfordsemantic.tech, or request a free evaluation license.

Take your first steps towards a solution.

Start with a free RDFox demo!

Take your first steps towards a solution.

Get started with RDFox for free!

Team and Resources

The team behind Oxford Semantic Technologies started working on RDFox in 2011 at the Computer Science Department of the University of Oxford with the conviction that flexible and high-performance reasoning was a possibility for data-intensive applications without jeopardising the correctness of the results. RDFox is the first market-ready knowledge graph designed from the ground up with reasoning in mind. Oxford Semantic Technologies is a spin-out of the University of Oxford and is backed by leading investors including Samsung Venture Investment Corporation (SVIC), Oxford Sciences Enterprises (OSE) and Oxford University Innovation (OUI).