elliotsawyer / silverstripe-typesense
Typesense is Lightning-fast, Open Source Search. No PhD required. Open Source alternative to Algolia + Pinecone + and an Easier-to-Use alternative to ElasticSearch and Solr. Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences. This enables Silverstripe to wo
Package info
codeberg.org/0x/silverstripe-typesense
Type:silverstripe-vendormodule
pkg:composer/elliotsawyer/silverstripe-typesense
- dev-main
- 2.x-dev
- 2.0.0-rc3
- 2.0.0-rc2
- 2.0.0-rc1
- 1.x-dev
- 1.0.0-rc3
- 1.0.0-rc2
- 1.0.0-rc1
- 0.x-dev
- 0.0.9
- 0.0.8
- 0.0.8a
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- 0.0.0
- dev-feature/disable-ssl-verification
- dev-issues/24
- dev-fix/existence-check
- dev-upgrade/6
- dev-0x-patch-1
- dev-feature/collections-with-multiple-recordclasses
- dev-feature/synonyms
This package is auto-updated.
Last update: 2026-03-13 22:27:42 UTC
README
Author: Elliot Sawyer
Repository: https://codeberg.org/0x/silverstripe-typesense
Docs: https://0x.codeberg.page/silverstripe-typesense/
Live demos: https://sawyer.nz/demos
![]() | ![]() |
|---|
Typesense is lightning-fast, open source search - no PhD required! It is an open source alternative to Algolia and an easier-to-use alternative to ElasticSearch and Solr. It offers fast, typo-tolerant, in-memory fuzzy search for building delightful search experiences.
This module was created to create a searchable Silverstripe website using Typesense for indexing. It provides highly performant, nearly-instant, and often sub-millisecond response times.
Typesense supports:
- Faceting
- Sorting
- Curated searches
- Synonyms
- Scoped, key-protected search
- Geospatial searches
- Machine learning and GPU-enhanced searches
- Automatic schema detection
- Analytics
- Document text extraction
- Multi-language support, including macron recognition and non-Latin characters.
- Federated search
Quick start
Set your global API key in .env or your environment variables. This can be any value, but make sure it is secret and not easily guessable:
#'head /dev/urandom | shasum -a 256' works great for this
TYPESENSE_API_KEY=5f02d0b58c49a99e8e8f65b74ebb9fdc5b1a2dfe56639bdc8551650900435f33
# this is your INTERNALLY accessible typesense server, not the one that appears in frontend
# see docs/07-searching.md for more info
TYPESENSE_SERVER="http://internal-hostname:8108"
# this is obtained from the Typesense dashboard, after you've started it up
# see docs/07-searching.md
TYPESENSE_SEARCH_KEY=""
Install the module:
composer require elliotsawyer/silverstripe-typesense
Set up a collection in the CMS, or set it up initially with YML:
ElliotSawyer\SilverstripeTypesense\Typesense:
collections:
Page:
name: Pages
fields:
- { name: Title, type: string, sort: true }
- { name: Content, type: string, optional: true }
- { name: Link, type: string, index: false, optional: true}
- { name: Tags, type: string[], facet: true, optional: true, sort: false}
- { name: Subsite, type: string, facet: true}
Run vendor/bin/sake dev/tasks TypesenseSyncTask
SSL Verification
You can instruct the Typesense PHP client to not verify the SSL certificate of the Typesense server. This is used for local development, or if Typesense is reverse-proxy'ed behind a webserver with a self-hosted certificate. This will use \Http\Client\Curl\Client since Typesense-PHP requires it; however, if GuzzleHttp\Client is present this will be used instead.
---
Name: typesense-ssl-dev
Only:
environment: dev
---
ElliotSawyer\SilverstripeTypesense\Typesense:
disable_ssl_verification: true
Versioning and support
This module roughly follows semantic versioning and tries to follow the latest version of Typesense and the Typesense SDK, but this is not always possible across versions. Major upgrades will align with major versions of Silverstripe. Support for the module will only officially follow supported Silverstripe versions
- main - latest bleeding-edge stuff. May break things, so stick to stable tags.
- 0.x - this initial proof-of-concept build targets Silverstripe 4.13.
- there is a known issue with the Typesense PHP SDK where a minor patch release introduced a breaking change to
monolog/monolog, which prevented newer versions of the SDK from being used. As such, these users are officially restricted to ~Typesense 27
- there is a known issue with the Typesense PHP SDK where a minor patch release introduced a breaking change to
- 1.x - this branch (and its tags) will drop Silverstripe 4 support and target Silverstripe 5.4 on PHP 8.1. No new features are planned for this branch, but I will provide security and bug fixes where applicable as long as SS5 is supported.
- 2.x - this branch (and its tags) will drop Silverstripe 5 support and target Silverstripe 6 only. Most new features will be found in here.
Paid support for end-of-life installations is always available.
Documentation
- Development
- Installation
- Configuration
- Managing Collections and Fields
- Syncing
- How to search
- Troubleshooting
- Synonyms
Copyright statements
This software includes contributions from Elliot Sawyer, available under the LGPL3-With-Attribution license. This attribution statement is required to be shipped with the module, and is displayed within your application. These will appear in certain areas of your application where the module is being used.
Support
Like my work? Consider shouting me a coffee or a small donation if this module helped you solve a problem. I accept cryptocurrency at the following addresses:
- Bitcoin: 12gSxkqVNr9QMLQMMJdWemBaRRNPghmS3p
- Bitcoin Cash: 1QETPtssFRM981TGjVg74uUX8kShcA44ni
- Litecoin: LbyhaTESx3uQvwwd9So4sGSpi4tTJLKBdz
Paid support is available. Please get in touch at https://sawyer.nz/contact

