PHPackages                             silverstripe/silverstripe-discoverer-bifrost - 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. silverstripe/silverstripe-discoverer-bifrost

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

silverstripe/silverstripe-discoverer-bifrost
============================================

A plugin module for silverstripe/silverstripe-discoverer that provides integration for Silverstripe Bifröst

3.1.0(1mo ago)02.3k↑50%[1 issues](https://github.com/silverstripeltd/silverstripe-discoverer-bifrost/issues)1BSD-3-ClausePHPPHP ^8.3CI passing

Since Jul 30Pushed 1mo ago7 watchersCompare

[ Source](https://github.com/silverstripeltd/silverstripe-discoverer-bifrost)[ Packagist](https://packagist.org/packages/silverstripe/silverstripe-discoverer-bifrost)[ Docs](https://github.com/silverstripeltd/silverstripe-discoverer-bifrost)[ RSS](/packages/silverstripe-silverstripe-discoverer-bifrost/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (8)Dependencies (14)Versions (12)Used By (1)

🧭 Silverstripe Discoverer &gt; [![](https://camo.githubusercontent.com/f4d745abd42963241cf1ededf8d9f506552a8c6db022508d4fb7103de7beac86/68747470733a2f2f7777772e73696c7665727374726970652e636f6d2f66617669636f6e2e69636f)](https://camo.githubusercontent.com/f4d745abd42963241cf1ededf8d9f506552a8c6db022508d4fb7103de7beac86/68747470733a2f2f7777772e73696c7665727374726970652e636f6d2f66617669636f6e2e69636f) Silverstripe Search
====================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#-silverstripe-discoverer---silverstripe-search)

- [🧭 Silverstripe Discoverer &gt; ![](https://camo.githubusercontent.com/f4d745abd42963241cf1ededf8d9f506552a8c6db022508d4fb7103de7beac86/68747470733a2f2f7777772e73696c7665727374726970652e636f6d2f66617669636f6e2e69636f) Silverstripe Search](#-silverstripe-discoverer--img-srchttpswwwsilverstripecomfaviconico-styleheight40px-vertical-alignmiddle-silverstripe-search)
    - [Purpose](#purpose)
    - [Installation](#installation)
    - [Engine vs Index](#engine-vs-index)
    - [Specify environment variables](#specify-environment-variables)
        - [Understanding your engine prefix and suffix:](#understanding-your-engine-prefix-and-suffix)
    - [Usage](#usage)
        - [Building a query](#building-a-query)
        - [Processing results](#processing-results)
        - [Understanding fields and results](#understanding-fields-and-results)

Purpose
-------

[](#purpose)

Perform search queries on your Silverstripe Search data through Silverstripe CMS controllers.

This module is used to integrate with the 🌈 Bifröst - the API for Silverstripe's Search service.

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

[](#installation)

```
composer require silverstripe/silverstripe-discoverer-bifrost
```

Engine vs Index
---------------

[](#engine-vs-index)

Important

**TL;DR:**
For all intents and purposes, "engine" and "index" are synonomous. If we refer to something as "engine", but the Discoverer module is asking for an "index", then you simply need to give it the data you have for your engine.

The Discoverer module is built to be service agnostic; meaning, you can use it with any search provider, as long as there is an adaptor (like this module) for that service.

When Discoverer refers to an "index", it is talking about the data store used for housing your content. These data stores are known by different names across different search providers. Algolia and Elasticsearch call them "indexes", Typesense calls them "collections", App Search calls them "engines". Discoverer had to call them **something** in its code, and it chose to call then "indexes"; Silverstripe Search, however, calls them "engines".

Actions apply in the same way to all of the above. In Silverstripe Search, the action of "indexing" is the action of adding data to your engine, where it is said to be "indexed". Updating that data is commonly referred to as "re-indexing".

Specify environment variables
-----------------------------

[](#specify-environment-variables)

To integrate with Silverstripe Search, define environment variables containing your endpoint, engine prefix, and query API key.

```
BIFROST_ENDPOINT="https://abc.provided.domain"
BIFROST_ENGINE_PREFIX="" # See "Understanding your engine prefix and suffix" below
BIFROST_QUERY_API_KEY="abc.123.xyz"

```

### Understanding your engine prefix and suffix:

[](#understanding-your-engine-prefix-and-suffix)

Important

**TL;DR:**

- All Silverstripe Search engine names follow a 4 slug format like this: `search---`
- Your `` is everything except `-`; so, it's just `search--`

For example:

EngineEngine prefixEngine suffixsearch-acmecorp-prod-mainsearch-acmecorp-prodmainsearch-acmecorp-prod-incsearch-acmecorp-prodincsearch-acmecorp-uat-mainsearch-acmecorp-uatmainsearch-acmecorp-uat-incsearch-acmecorp-uatinc**Why?**

Because you probably have more than one environment type that you're running search on (e.g. Production and UAT), and (generally speaking) you should have different engines for each of those environments. So, you can't just hardcode the entire engine name into your project, because that code doesn't change between environments.

Whenever you make a query, Discoverer will ask you for the "index" name; you will actually want to provide only the ``. We will then take `BIFROST_ENGINE_PREFIX` and your ``, put them together, and that's what will be queried. This allows you to set `BIFROST_ENGINE_PREFIX` differently for each environment, while having your `` hardcoded in your project.

More on this in [Usage](#usage)

Usage
-----

[](#usage)

As mentioned above, this module serves as an "adaptor provider" for Discoverer. Besides the installation steps above, you shouldn't really be interacting with this module in your code.

That said, below is a **very simple** examples on how to get your first query and results, but please see the documentation provided in [Discoverer](https://github.com/silverstripeltd/silverstripe-discoverer) for more details on how to build queries and display results.

### Building a query

[](#building-a-query)

Instantiate the search service:

```
$service = SearchService::create();
```

Create a new query:

```
$query = Query::create('lorem ipsum');
```

When performing a search, Discoverer will ask you for the `Query` object (above), and the "index" to be queried. This should just be the engine `` (mentioned in [Understanding your engine prefix and suffix](#understanding-your-engine-prefix-and-suffix)):

```
// $results will be a Result object, a class provided by the Discoverer module
$results = $service->search($query, '');
// Debug results
Debug::dump($results);
```

### Processing results

[](#processing-results)

For this quick example, we'll assume we had a couple of fields in our engine: `title`, `content` (more on fields in [Understanding fields and results](#understanding-fields-and-results))

You have your `$results` (a `Results` object). You can now loop through its `Records`, which is just a paginated list of `Record`.

In PHP:

```
foreach ($results->getRecords() as $record) {
    Debug::dump($record->Title);
    Debug::dump($record->Content);
}
```

Or in your template:

```

    $Title
    $Content

```

### Understanding fields and results

[](#understanding-fields-and-results)

The Discoverer module attempts to standardise all data store (index/engine/collection) fields into a "Silverstripe'y" format that we're all familiar with - PascalCase.

For example:

Engine fieldDiscoverer results fieldidIdrecord\_idRecordIdtitleTitlecontentContentmeta\_image\_urlMetaImageUrlelemental\_areaElementalAreataxonomy\_term\_idsTaxonomyTermIds**Note:** Abbreviations like `id`, or `url` are treated like any other word, so even though it's quite common practice in Silverstripe to name it an `ID` (both capitalised), Discoverer will convert these to `Id` and `Url` respectively.

**Why?**

Because the Discoverer module has no way to programatically understand what abbreviation you might have in your code, so it's better to just use a standard across anything and everything that looks like a word.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance90

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 60.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~81 days

Total

9

Last Release

51d ago

Major Versions

1.1.0 → 2.0.02024-11-06

2.x-dev → 3.0.02025-10-24

PHP version history (2 changes)1.0.0PHP ^8.1

3.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/afbb3dcc9ef29c1a6eedd6addcae5fce9ab1271915a85a4c349301b71237368d?d=identicon)[silverstripe-machine01](/maintainers/silverstripe-machine01)

---

Top Contributors

[![chrispenny](https://avatars.githubusercontent.com/u/505788?v=4)](https://github.com/chrispenny "chrispenny (29 commits)")[![blueo](https://avatars.githubusercontent.com/u/948122?v=4)](https://github.com/blueo "blueo (16 commits)")[![HeyImPhil](https://avatars.githubusercontent.com/u/4695076?v=4)](https://github.com/HeyImPhil "HeyImPhil (3 commits)")

---

Tags

searchsilverstripequeryfilterfilteringSilverstripe-CMSqueryingSearch Service

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/silverstripe-silverstripe-discoverer-bifrost/health.svg)

```
[![Health](https://phpackages.com/badges/silverstripe-silverstripe-discoverer-bifrost/health.svg)](https://phpackages.com/packages/silverstripe-silverstripe-discoverer-bifrost)
```

###  Alternatives

[transip/transip-api-php

TransIP Rest API Library

33304.8k8](/packages/transip-transip-api-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[mongerinc/search-request

Represent complex search queries and convert them to and from JSON

242.1k](/packages/mongerinc-search-request)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
