The snippet can be downloaded here:
- Version 1.4
- Allows user input with "quoted strings" for exact matches.
- Version 1.3
- Includes a facility to only search part(s) of the site document tree, or alternatively exclude parts.
- Database character set selection now manual but defaults to UTF-8.
- Code now suitable for searching sites that may have document groups only visible to logged in webusers.
- Matches on the exact phrase typed in are prioritised in the rankings.
- Re-search form now included in the templating - by default it occours in &searchStartTpl.
- Earlier versions can be found at http://timspencerweb.co.uk/assets/files/modxSearch/
Call it using the following code on the results page template:
[!Search!]
Limitations/bugs are as noted in the snippet comments in the head, but I do believe it is more robust than the snippet I used to use which is in common usage. It is worth pointing out that this snippet is not feature-packed and is not intended to be. Enjoy!