Part 4.3: Final steps

This tutorial covers enabling a plugin on a search and testing it on real data.

Prerequisites

Before using this guide ensure that you have installed the plugin.

Choose a suitable search to test it with

On your Funnelback server create a new web data source or use an existing web data source that is suitable for testing with the plugin. In this guide, we’re going to assume you have a standard web data source that points to www.example.com. So there will be one document in this data source by default.

Before enabling plugin on example.com

Select the plugin screen from the left hand navigation and scroll down to find the plugin you just added (Modify title prefix).

Before enabling plugin on example.com
the search filter won’t work here because it only searches over released plugins. The Learn more about plugin link also won’t work at this stage because the plugin documentation hasn’t been published yet.

Click on the tile to setup the plugin for your example search.

Setup the plugin

  1. Add the plugin to the example search

    plugin test enable 1
  2. Configure the plugin with the following:

    Configuration key Value

    Pattern

    Example

    Replace with

    My First Plugin! -

    plugin test enable 2
  3. Click the Finish & Publish button to complete your plugin setup.

    The Finish & Publish button is only displayed for results page plugins. Data source plugins will only display a Finish button

Rerun the search and observe the output comparing the titles to what was returned before the plugin was enabled.

Before enabling plugin on example.com
Some plugins will require a reindex to take effect. The example plugin here works without a reindex because it only implements the search lifecycle interface which only makes query-time modifications.

Congratulations

You have now created your first plugin.

Did something go wrong?

If you followed this guide exactly you should have a working plugin at this point. However there are many places where things can go wrong. Things not working the first time round is a vital part of the developer experience, and its also important to learn how to debug what went wrong. The final note in our guide is to look at some hints for using logging to help understand what is happening.

The source files used for the title prefix plugin developed in this guide are available for your reference.

Next steps

Take a look at the plugin developer documentation and check out the different interfaces that are available.

Some suggestions:

  • Write a filter plugin that modifies the page titles before they are indexed (providing a similar end result to what was implemented in this tutorial).

  • Write a custom gatherer plugin that downloads all of the links contained in an RSS feed.

  • Write a plugin that gathers content from a different social media service like Vimeo - implementing the custom gatherer interface to communicate with the API and fetch the content, the indexer interface to set default metadata mappings and faceted navigation interface to create some default facets for the search.