alveby / atrium-search
Site search for Atrium: one search across every installed module, per site and language, with database full-text on SQLite, MySQL and PostgreSQL
Requires
- php: ^8.3
- alveby/atrium: ^0.1
- illuminate/support: ^13.0
Requires (Dev)
- alveby/atrium-theme: ^0.1
- orchestra/testbench: ^11.0
- phpunit/phpunit: ^12.5
Suggests
- alveby/atrium-theme: Draws the results page and the search box in the header
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-19 23:08:52 UTC
README
Site search for Atrium: one search across every installed module, for the current site and language, with the words marked in the results. The index is a table of the site's own database, with full-text search on MySQL, MariaDB and PostgreSQL and LIKE on SQLite; no outside service.
Install
composer require alveby/atrium-search php artisan atrium:module:install alveby/atrium-search php artisan atrium:search:rebuild
What you get
/search(routeatrium.search) and a search box in the header of the public theme (alveby/atrium-theme): results grouped by module, a page per module, snippets with<mark>.- A box in the admin header that finds records of every module the editor may see.
GET /api/v1/site-search?q=…for API tokens and the MCP toolsearch_site.php artisan atrium:search:rebuildto fill the index anew.
Every model with public pages is searched by its name and its text fields; a module or the app says otherwise in extra.atrium.search or config('atrium.search').
The guide: docs/search.md (по-русски).
Hooks
atrium.search.sources(filter): the searched models,class => ['title' => …, 'content' => [...]]; add or remove one. See docs/search.md.
Tests
From the repository root:
vendor/bin/phpunit packages/search/tests
The tests cover indexing and the rebuild, languages, sites, dates of publication, the results page, the admin box and the API, on SQLite, MySQL and PostgreSQL.
Contributing
This repository is a read-only copy of packages/search in AlveBy/atrium. Issues and pull requests go there.
License
MIT