PHPackages                             ichaber/silverstripe-swiftype - 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. ichaber/silverstripe-swiftype

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

ichaber/silverstripe-swiftype
=============================

Use Swiftype search with Silverstripe

3.0.0(7mo ago)123.5k—7.1%5[1 issues](https://github.com/silverstripe-terraformers/silverstripe-swiftype/issues)BSD-3-ClausePHPPHP ^8.3

Since Mar 26Pushed 7mo ago5 watchersCompare

[ Source](https://github.com/silverstripe-terraformers/silverstripe-swiftype)[ Packagist](https://packagist.org/packages/ichaber/silverstripe-swiftype)[ Docs](http://github.com/ichaber/silverstripe-swiftype)[ RSS](/packages/ichaber-silverstripe-swiftype/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (20)Used By (0)

SilverStripe Swiftype
=====================

[](#silverstripe-swiftype)

[![Build Status](https://camo.githubusercontent.com/c5db2c4b50db7a3cc0480213c2b4c019bcb1c9bff9bf3df299bb4863b9c211da/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f696368616265722f73696c7665727374726970652d73776966747970652e7376673f7374796c653d666c6174)](https://travis-ci.org/ichaber/silverstripe-swiftype)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6d92d830b2a40ae61804602f17a0c289fb67bf30b030a198674db01db8a6d7f7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f696368616265722f73696c7665727374726970652d73776966747970652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ichaber/silverstripe-swiftype/?branch=master)[![codecov](https://camo.githubusercontent.com/4f02e022185f90032697302c3c18e7bc474f5c7432012b4cb26ca010b8af2c6e/68747470733a2f2f636f6465636f762e696f2f67682f696368616265722f73696c7665727374726970652d73776966747970652f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/ichaber/silverstripe-swiftype)

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

[](#installation)

Install with Composer:

```
composer require ichaber/silverstripe-swiftype

```

Also see [Configuration](#Configuration). Extensions and configurations are not applied automatically.

Documentation
-------------

[](#documentation)

Provides the necessary code for configuring the swiftype integration code with the access key and for adding metadata tags to the site code so the Swiftype crawler can be index them.

The code also provides an extension which triggers a re-index after a page is published/unpublished in the SilverStripe CMS admin area.

How does it work?
-----------------

[](#how-does-it-work)

### MetaTags

[](#metatags)

There are a bunch of standard `SwiftypeMetaTag` classes. Each of these classes represents one of the standard SilverStripe SiteTree fields *or methods*, and will be used to output a single meta tag into your markup.

Here are the standard classes, and which SiteTree field/method they represent:

- SwiftypeMetaTagDescription (`MetaDescription` field)
- SwiftypeMetaTagPublishedAt (`LastEdited` field)
- SwiftypeMetaTagTitle (`Title` field)
- SwiftypeMetaTagURL (`Link()` method)

Additionally, there is a robots class, which can be used to output `noindex` and/or `nofollow` (configurable) when your SiteTree record has `ShowInSearch` set to `0`. By default, this will render with just `noidex`, but you can update it's config to also render with `nofollow`.

- SwiftypeMetaTagRobots

### Templating

[](#templating)

If you are using out of the box functionality (see [Configuration](#Configuration)), then in your template, you can simply use `$SwiftypeMetaTags` to output all of the meta tags that you have set up as part of your install.

### Crawling

[](#crawling)

If you are using out of the box functionality (see [Configuration](#Configuration)), then when you publish a page, a request will be sent to Swiftype for it to crawl that page.

Configuration
-------------

[](#configuration)

### Simple

[](#simple)

If you just want to plug and play, then apply the following three extensions.

```
SilverStripe\SiteConfig\SiteConfig:
  extensions:
    - Ichaber\SSSwiftype\Extensions\SwiftypeSiteConfigFieldsExtension
SilverStripe\CMS\Model\SiteTree:
  extensions:
    - Ichaber\SSSwiftype\Extensions\SwiftypeSiteTreeCrawlerExtension
    - Ichaber\SSSwiftype\Extensions\SwiftypeMetaTagContentExtension
```

These will provide you with:

- The standard CMS fields for adding your Swiftype credentials.
- A template variable (`$SwiftypeMetaTags`) for outputting your meta tags.
- Re-index requests to Swiftype on SiteTree publishing.

You will then need specify which Meta Tags you would like to use. You can do this in two ways.

In a config yaml:

```
App\Page\MyPage:
  swiftype_meta_tag_classes:
    - Ichaber\SSSwiftype\MetaTags\SwiftypeMetaTagDescription
    - Ichaber\SSSwiftype\MetaTags\SwiftypeMetaTagPublishedAt
    - Ichaber\SSSwiftype\MetaTags\SwiftypeMetaTagRobots
    - Ichaber\SSSwiftype\MetaTags\SwiftypeMetaTagTitle
    - Ichaber\SSSwiftype\MetaTags\SwiftypeMetaTagURL
```

Or in your model:

```
class MyPage extends SiteTree
{
    /**
     * @var array
     */
    private static $swiftype_meta_tag_classes = [
        SwiftypeMetaTagDescription::class,
        SwiftypeMetaTagPublishedAt::class,
        SwiftypeMetaTagRobots::class,
        SwiftypeMetaTagTitle::class,
        SwiftypeMetaTagURL::class,
    ];
}
```

Either of these methods should provide you with good control if you have different page types needing different meta tags.

**A quick note on the Robots class**

Swiftype uses the standard `` meta tag, so if you are already outputting this tag through some other means, then you will want to exclude it here. Also see \[Customising the robots Meta Tag\](#Customising the robots Meta Tag)

### Piece by piece

[](#piece-by-piece)

To use the standard SiteConfig CMS fields, you can apply `SwiftypeSiteConfigFieldsExtension` to your `SiteConfig`. This will provide you with some basic options to set up a single engine for your site.

Currently there is minimal support for multiple engines on a single site - you will (most likely) need to add your own implementation if you desire this.

```
SilverStripe\SiteConfig\SiteConfig:
  extensions:
    - Ichaber\SSSwiftype\Extensions\SwiftypeSiteConfigFieldsExtension
```

If you are using the Swiftype Crawler, and would like to add "re-crawl" actions after your pages un/publish, you can apply `SwiftypeSiteTreeCrawlerExtension` to `SiteTree` (or another model of your choice).

```
SilverStripe\CMS\Model\SiteTree:
  extensions:
    - Ichaber\SSSwiftype\Extensions\SwiftypeSiteTreeCrawlerExtension
```

If you would like SiteTree to have access to the standard template variable, then apply the following extension.

```
SilverStripe\CMS\Model\SiteTree:
  extensions:
    - Ichaber\SSSwiftype\Extensions\SwiftypeMetaTagContentExtension
```

### Indexing Files

[](#indexing-files)

If you are using the Swiftype Crawler, and would like to add "re-crawl" actions after your Files un/publish, you can apply `SwiftypeFileCrawlerExtension` to `File` (or another model of your choice).

```
SilverStripe\CMS\Model\File:
  extensions:
    - Ichaber\SSSwiftype\Extensions\SwiftypeFileCrawlerExtension
```

There is also a config to allow certain file types from being indexed/reindexed.

```
Ichaber\SSSwiftype\Extensions\SwiftypeFileCrawlerExtension:
 reindex_allowed_extensions:
   - pdf
```

> NB: by default this config does not set any extensions to be indexed.

Indexing custom DataObjects
---------------------------

[](#indexing-custom-dataobjects)

If you want to index your own custom DataObjects, simply create your own crawler extension by extending

Adding your own Meta Tags
-------------------------

[](#adding-your-own-meta-tags)

You can easily add your own classes to your objects (see [Installation](#Installation)).

Any classes that you add are expected to implement `SwiftypeMetaTagInterface`, but that's about it.

You can also feel free to extend `SwiftypeMetaTag`, if you would like access to methods like `generateMetaTagsString()`.

Customising the robots Meta Tag
-------------------------------

[](#customising-the-robots-meta-tag)

There are two configs available for the robots Meta Tag. These allow you to control whether you add `noindex` and/or `nofollow`. By befault, `noindex` is added, but we allow robots to follow.

```
Ichaber\SSSwiftype\MetaTags\SwiftypeMetaTagRobots:
  no_index: true
  no_follow: false

```

You can override these by adding your own config. EG: Adding both `noidex` and `nofollow`.

```
---
Name: app_swiftype_tags
After: swiftype_tags
---
Ichaber\SSSwiftype\MetaTags\SwiftypeMetaTagRobots:
  no_index: true
  no_follow: true
```

Requirements
------------

[](#requirements)

- PHP 8.3 or higher
- SilverStripe Framework 6.x
- SilverStripe CMS 6.x

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance45

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 50% 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 ~184 days

Recently: every ~210 days

Total

16

Last Release

214d ago

Major Versions

0.1.3 → 1.0.0-rc12019-02-14

1.1.0 → 2.0.02023-02-26

1.2.0 → 2.1.02023-06-29

2.x-dev → 3.0.02025-10-16

PHP version history (4 changes)1.0.0-rc1PHP ^7.1

1.1.0PHP ^7.4 || ^8.0

2.0.0PHP ^8.1

3.0.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/505788?v=4)[Chris Penny](/maintainers/chrispenny)[@chrispenny](https://github.com/chrispenny)

![](https://avatars.githubusercontent.com/u/16602727?v=4)[mfendek](/maintainers/mfendek)[@mfendek](https://github.com/mfendek)

![](https://avatars.githubusercontent.com/u/855269?v=4)[Hayden Shaw](/maintainers/thats4shaw)[@thats4shaw](https://github.com/thats4shaw)

![](https://avatars.githubusercontent.com/u/948122?v=4)[Bernard Hamlin](/maintainers/blueo)[@blueo](https://github.com/blueo)

![](https://www.gravatar.com/avatar/8851aaee4590c254fd773e3733bfe4d5be66bd08d242f7df52a3d0ed4d27ea16?d=identicon)[ichaber](/maintainers/ichaber)

---

Top Contributors

[![ichaber](https://avatars.githubusercontent.com/u/929858?v=4)](https://github.com/ichaber "ichaber (18 commits)")[![chrispenny](https://avatars.githubusercontent.com/u/505788?v=4)](https://github.com/chrispenny "chrispenny (9 commits)")[![mfendeksilverstripe](https://avatars.githubusercontent.com/u/26395487?v=4)](https://github.com/mfendeksilverstripe "mfendeksilverstripe (4 commits)")[![lexakami](https://avatars.githubusercontent.com/u/7085702?v=4)](https://github.com/lexakami "lexakami (3 commits)")[![blueo](https://avatars.githubusercontent.com/u/948122?v=4)](https://github.com/blueo "blueo (2 commits)")

---

Tags

searchsilverstripeswiftype

### Embed Badge

![Health badge](/badges/ichaber-silverstripe-swiftype/health.svg)

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

###  Alternatives

[quinninteractive/silverstripe-seo

An all-in-one SEO module for SilverStripe

3328.2k](/packages/quinninteractive-silverstripe-seo)[silverstripe/solr

Solr integration for SilverStripe. Note that this is NOT related to the silverstripe/fulltext package.

1914.0k](/packages/silverstripe-solr)[g4b0/searchable-dataobjects

This module adds DataObjects to frontend search

254.9k](/packages/g4b0-searchable-dataobjects)

PHPackages © 2026

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