Built-in Search Engine
Introduction
Converge includes a built-in search engine, written entirely in raw PHP, and designed specifically for documentation. From day one, your docs are searchable no external services, no setup, and no cost.
Converge also provides a top-tier UI modal offering an exceptional search experience, with support for recent searches, favorites, and accessibility.
Search Index
to search your contents you must build the search index by running this command:
php artisan converge:index-search
This command scans all of your Markdown files across modules, versions, and clusters and creates the necessary resources to deliver an instant search experience, All search data is stored under storage/converge/*
If you're wondering how to handle search indexes in production, refer to the deployement docs
every you change your files contents (at this point headings #, ##, etc) you must re index your markdown contents
Customization
The built-in search engine is customizable via the config/converge.php
file. You can control behavior such as:
- Stop words handling : choose whether to index common words like “the”, “and”, etc.
By default, Converge indexes stop words. To disable this, set 1'keep_stop_words' => false
- Fuzzy search : enable approximate matching to support typos and similar terms
Fuzzy search is enabled by default. To turn it off, set 1'fuzzy_search' => 'false'
- Fuzzy algorithm : switch between jaro_winkler or levenshtein for matching logic
The default is 1jaro_winkler
. To switch to Levenshtein, set 1'fuzzy_search_using' => 'levenshtein'
- Result limit : set how many results to return per query
By default, Converge returns up to 50 results. To change this, set 1'results_max_count' => 40
(any number)
These options help you tailor the search experience to your specific needs, whether you're building small internal docs or a large multi-package documentation hub.
A Proof of Concept
This initial version is a proof of concept a demonstration that yes, it's absolutely possible to deliver a lightweight, effective search experience using just PHP.
Currently, the engine:
-
uses the same algorithms behind big full text seach engines
-
Indexes only Markdown headings (#, ##, ###, etc.)
-
Uses a filesystem-based index driver
-
Delivers simple, fast results with no external dependencies
What’s Next
This is just the beginning. The built-in search is still evolving and has plenty of room to grow. Upcoming improvements may include:
- Support for additional index drivers (e.g., SQLite, mysql, postgresql, Redis, or full-text search engines using plugins approach)
- Smarter ranking algorithms for more relevant results
- Deeper content indexing, beyond just heading
Why We Took This Path
We believe that every Converge powered site should offer instant, private, and free search capabilities out of the box.
Just fast, accessible documentation ready to go.