Skip to content
View in the app

A better way to browse. Learn more.

ernestdefoe.online

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
ernestdefoe.online

Extensions, themes & support for Flarum and Invision Community

Vibe coding for the community web. Report a bug, request a feature, or dig into the source — this is where the tools you use get built, in the open.

We do custom Bespoke Invision Community apps. If you have an idea for something you want then use the contact form to get in touch with us.

Typesense Search — support and discussion

Featured Replies

  • Administrators
  • Community Expert

Typesense Search for Flarum

A free, drop-in Typesense search driver for Flarum 2

fast, typo-tolerant full-text search across discussions, users and posts that anyone

can set up in a few minutes.

Flarum 2 shipped a pluggable search architecture; this extension implements a Typesense

driver for it. Text searches are answered by Typesense; everything else (filtering,

browsing, permissions) stays exactly as Flarum does it. You choose per resource which

searches Typesense answers.

Why it's safe by design

Typesense is only ever asked for candidate discussion IDs and their ranking. Which

results a given user may actually see is decided entirely by Flarum's own

whereVisibleTo (including tag restrictions) — never by Typesense. The search server

holds no authorization logic, and the browser never talks to it. Your API key is stored

server-side and is never exposed to visitors.

Requirements

  • Flarum ^2.0

  • A running Typesense server (self-hosted is a single binary or Docker container, or use

    Typesense Cloud)

Install

composer require ernestdefoe/typesense

Run Typesense (self-hosted example)


  -v typesense-data:/data typesense/typesense:27.1 \
  --data-dir /data --api-key='CHANGE_ME' --enable-cors```

## Set up

1. **Admin → Typesense Search.** Enter the host, port, protocol and API key, then **Save**.
2. Click **Test connection** to confirm Flarum can reach the server.
3. Click **Rebuild index** (or run `php flarum typesense:index`) to populate the index

   from your existing discussions.
4. Turn on **Use Typesense for discussion search** and save.

That's it — searches for discussions are now served by Typesense.

Search tabs that Typesense answers show a small **Powered by Typesense** badge in the

search modal, so you can see at a glance which searches are using the driver. Only that

on/off fact is sent to the browser — connection details and the API key stay on the server.

### Console

```php flarum typesense:index          # build / refresh the index
php flarum typesense:index --flush  # delete the index```

## How indexing works

* Each discussion is one Typesense document: its title plus the concatenated text of its

  visible comment posts.
* Creating, editing or deleting a discussion or post re-indexes the affected discussion

  automatically through Flarum's queued indexing pipeline.
* **Configure a real queue driver** (`redis`, `database`, …) in production so indexing and

  rebuilds run in the background rather than inline on a web request.

Several forums can share one Typesense server safely — collections are namespaced by a

prefix (set one, or it's derived from your forum URL).

## What's indexed

Everything Flarum can full-text search, each in its own namespaced collection:

* **Discussions** — title + the concatenated text of visible comment posts.
* **Users** — username and display name.
* **Posts** — individual comment post text (post-scoped search).

Each is toggled independently in the admin, so you can send discussion search to

Typesense while leaving users or posts on the database, or run all three through it.

(Groups and access tokens have no full-text search in Flarum, so they always stay on the

database driver.)

## License

[MIT](./LICENSE.md) © Ernest Defoe
  • 3 weeks later...
  • Replies 1
  • Views 65
  • Created
  • Last Reply

Top Posters In This Topic

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.