PHPackages                             madmatt/silverstripe-funnelback - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. madmatt/silverstripe-funnelback

ActiveSilverstripe-vendormodule[Search &amp; Filtering](/categories/search)

madmatt/silverstripe-funnelback
===============================

Provides an interface to search a Funnelback collection

1.1.0(3y ago)11.2k3[1 issues](https://github.com/madmatt/silverstripe-funnelback/issues)BSD-3-ClausePHPPHP ^8

Since Nov 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/madmatt/silverstripe-funnelback)[ Packagist](https://packagist.org/packages/madmatt/silverstripe-funnelback)[ RSS](/packages/madmatt-silverstripe-funnelback/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Silverstripe Funnelback search module
=====================================

[](#silverstripe-funnelback-search-module)

This module provides an interface to query a [Funnelback](https://www.squiz.net/funnelback) [collection](https://docs.squiz.net/funnelback/archive/15.24/collections/collection-overview/index.html).

Features
--------

[](#features)

### Current features

[](#current-features)

- Search a single Funnelback collection by one or more keywords
- Present paginated search results to users
- Has been tested and known to work with Funnelback version 15.

You can see this module in action on the [Whaikaha - Ministry of Disabled People website](https://whaikaha.govt.nz/search?query=accessibility).

### Still to do

[](#still-to-do)

- Identify a search result in the database and provide the most up-to-date content for the results page
- Ability to filter or facet information (reliant on Funnelback supporting this)

### What this module won't try to do

[](#what-this-module-wont-try-to-do)

- Index content into a Funnelback collection. Instead, use the [silverstripe-search-service module](https://github.com/silverstripe/silverstripe-search-service)and add your own [Funnelback search service](https://github.com/silverstripe/silverstripe-search-service/blob/2/docs/en/customising_add_search_service.md), OR have Funnelback crawl your website directly.

Installation
------------

[](#installation)

Install this module via Composer:

```
$ composer require madmatt/silverstripe-funnelback
```

### Requirements

[](#requirements)

You need to be using Silverstripe CMS 4.10 or newer, no other dependencies should matter.

Usage
-----

[](#usage)

Once you've installed the module, you'll need to do two things:

1. Configure the necessary environment variables.
2. Create &amp; integrate your search form.

### Step 1: Configuring the necessary environment variables

[](#step-1-configuring-the-necessary-environment-variables)

This module needs the following environment variables configured:

- `SS_FUNNELBACK_URL`: The base URL to the Funnelback API endpoint, without any trailing slashes or path. For example,
- `SS_FUNNELBACK_USERNAME`: The username provided by Funnelback.
- `SS_FUNNELBACK_PASSWORD`: The password provided by Funnelback.
- `SS_FUNNELBACK_COLLECTION`: The name of the collection (e.g. example-collection).

Once configured, the module can be used to perform search requests.

### Step 2: Create &amp; integrate your search form

[](#step-2-create--integrate-your-search-form)

You may already have some search infrastructure in place. If so, adapt these instructions as needed. This assumes you have nothing setup yet.

Create a new controller for your search page - `app/src/Controllers/SearchController.php`:

```
