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

Installs: 28

Dependents: 0

Suggesters: 0

Security: 0

Type:vendor-plugin

0.0.7 2024-08-26 10:00 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

Supercharge Your Search With TypesenseA demo embedded on the Typesense homepage

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

Documentation

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