Search by

studiometa / foehn-search

titouanmathis

Native search for Foehn — typo tolerance and relevance with Loupe, in SQLite, with no licence and no external service.

Package info

github.com/studiometa/foehn-search

Homepage

Issues

pkg:composer/studiometa/foehn-search

Statistics

Installs: 18

Dependents: 0

Suggesters: 1

Stars: 0

0.13.0 2026-12-03 17:03 UTC

This package is auto-updated.

Last update: 2026-12-03 17:04:54 UTC


README

Native search for Føhn, with typo tolerance and relevance, from Loupe: SQLite files on the server, no licence and no external service.

See the documentation.

Note This package is part of the Føhn Framework monorepo. Please report issues and submit pull requests in the main repository.

Installation

composer require studiometa/foehn-search

studiometa/foehn-search requires the exact same version of studiometa/foehn. Upgrade the two packages together, for example composer require studiometa/foehn:<version> studiometa/foehn-search:<version>.

PHP needs the pdo_sqlite extension, with SQLite 3.35 or later, and the intl extension. The Føhn runtime image has both.

Why it is a package

Loupe brings doctrine/dbal and other dependencies that a site without search does not need.

What it provides

  • #[AsSearchDocument(postType: '…')]: a class that turns a post into a search document.
  • The index updates on save, trash, delete and term changes, through an #[AsJob] job.
  • The search page answered by the index, with taxonomy filters, pages and Facets unchanged.
  • SearchGroups: the results grouped by post type.
  • GET /wp-json/foehn-search/v1/suggestions?q=: suggestions while a visitor types.
  • wp foehn-search reindex: rebuild every index.
  • One index for each language, from the Multilingual contract.