Event search

Are you trying to index content from Google Calendar? This is supported using the Google Calendar plugin.
This feature is deprecated and will be removed in a future version. Please update any existing implementations to use supported features.

Funnelback’s events mode enables search over event records allowing an event to appear multiple times in the search results, which are grouped by date.

Funnelback includes a number of features to present search results which represent 'events' in an appropriate way. Events, for example, may need to be displayed multiple times within a result page if it spans multiple days and users may wish to restrict their search to some particular set of days.

Events mode changes the way in which Funnelback processes queries and is incompatible with a number of other features within Funnelback. This includes:

  • Combining faceted navigation and the event search query processing mode is not supported. Faceted navigation performs counts of unique documents URLs, whereas event search processing counts date occurrences of those events.

  • A number of features are not compatible with events mode as is only supported by Funnelback’s term at a time mode of query processing. These features can not be used at the same time as events mode:

    • Contextual navigation

    • Query blending

    • Curator

Representing events

Events are represented to Funnelback by documents with some specific metadata which indicate the dates on which the event occurs. For example, the following HTML document represents a user conference event which occurs over three days (the 20th to the 22rd of October, 2010).

<title>Funnelback User Conference</title>
<meta name="occurrences" content="20101020 | 20101021 | 20101022">
Event: Funnelback User Conference

Any HTML <meta> field or XML element may be used for the list of event occurrences, however, the dates must always be specified in the YYYYMMDD format shown above, and be separated by | (pipe) symbols.

After populating the document metadata, this metadata field (or XML field) must be mapped to a metadata class using the standard metadata mapping mechanisms. Any free metadata class may be mapped for this purpose and then referenced from within the event query (see below).

Configuring query processing

A query processor option is required for effective events search.

-events=on

This option, when added to the query processor options of a collection, switch query processing into event mode, which adjusts the way results are displayed.

Searching for events

In addition to selecting events which match some textual query, search result pages may be restricted to displaying only events which occur on some specific days, or within a specific date range. the following query, for example, would display only events containing the term 'conference' on the 21st or 22nd of October (assuming the occurrence dates have been mapped to the 'O' metadata class).

conference % O=20101021 O=20101022

Each desired date must be specified in the query, and note that the dates must be specified in order.

As an alternative, a date range may be specified with the following syntax:

conference % O>20101021<20101022

The method of expressing an events query splits the query string into two parts. A % character is used to split the query string between normal query constraints and event iteration parameters.

If it appears that some constraints are not applying then examine the XML or JSON data model and inspect the query as processed from the response element.

The query string should be in the following format:

<normal query constraints> % <event iterators>

e.g.

beethoven symphony genre:classical ensemble:orchestra % D=20160415 D>20160415 D<20160630 D=20160630

If any constraints appear to the right of the % character then these will get ignored. To work around this you may need to use a pre process or pre datafetch hook script to reconstruct the query prior to it being submitted to, or avoid using CGI parameters such as meta_X_sand which result in constraints being added to the query. These constraints can be added using a hook script instead.

Turning on events mode breaks the search template

This error can occur if you enable events mode on a collection that was set up prior to Funnelback v14.0.

The simple.ftl that shipped with Funnelback prior to v14.0 was incompatible with events mode and resulted in a HTTP 500 error being returned when accessing search results.

This can be corrected by making the following change to an existing template:

Update the simple.ftl to modify the tierbar check as follows:

<@s.Results>
    <#if s.result.class.simpleName == "TierBar">
        <#-- A tier bar -->
        <#if s.result.matched != s.result.outOf>
            <h2 class="fb-title">Search results that match ${s.result.matched} of ${s.result.outOf} words</h2>
        </#if>
        <#-- Print event tier bars if they exist -->
        <#if s.result.eventDate??>

            <h2 class="fb-title">Events on ${s.result.eventDate?date}</h2>
        </#if>
    <#else>