Lecteur Markdown
NARROWSEARCH_DOCUMENTATION_EN
Feature: Narrowsearch #
Full-text natural language search engine. Queries the `search_index` table with `MATCH...AGAINST` (MariaDB Natural Language Mode), weights relevance by title (×3) and displays up to 50 results.
---
Installation and Configuration #
Via FTP: Upload the `narrowsearch/` directory into `/plugins/`.
Via package manager: Select `narrowsearch` from the available plugins list.
Paths:
- Main plugin: `/plugins/narrowsearch/narrowsearch.php`
- Configuration: `/plugins/narrowsearch/conf/narrowsearch.conf.inc.php`
- Widget: `/plugins/narrowsearch/widget/`
Configuration parameters:
| Constant | Default | Description |
|---|---|---|
| `NARROW_LIMIT` | `50` | Maximum number of results |
| `NARROW_WARN` | `30` | Warning threshold (too many results) |
Required SQL table: `search_index`
Columns: `url`, `title`, `source`, `lang`, `content`
The table must be populated by the siteindexer plugin.
---
Usage #
Search Form #
- Text input (200 character limit)
- GET submission
Results #
Match table with:
- Title (link to the indexed URL)
- Source (originating plugin)
- Relevance score
If more than `NARROW_WARN` results are returned, a warning prompts the user to refine the query.
If the `search_index` table does not exist, an explanatory error message is displayed.
---
Hooks and Entry Points #
?obj=narrowsearch.php — Empty form
?obj=narrowsearch.php&q=TERM — Search results
---
Dependencies #
- `Beamreactor\Database\SQL`
- siteindexer plugin — populates the `search_index` table
- MariaDB with FULLTEXT support (InnoDB or MyISAM)