Table of Contents
Compatible with DokuWiki
- 2020-07-29 "Hogfather" unknown
- 2018-04-22 "Greebo" yes
- 2017-02-19 "Frusterick Manners" yes
- 2016-06-26 "Elenor Of Tsort" unknown
DokuWiki Sphinx Search plugin replaces DokuWiki's built-in search functionality with the Sphinx Search Engine powered search which gives high-performance and more relevant search results. The ''was'' derivation is a fork of the original plugin with the goal of making the code compatible with latest Dokuwiki releases, adding more configurable options, some broad refactorings of the code, a loose promise that the plugin will be maintained due to being in use, as well as some (subjectively) aesthetic changes.
- Google-style results (Results are shown in traditional Google-style: title, snippet and address (document path).)
- Filtering by namespaces (Click on namespaces in the results to see search only within chosen namespace, or simply use “ “search phrase @ns personal:mike:travel”)
- Document sections are indexed separately (This is very useful for those who have large pages in DokuWiki)
- Additional scripts for cron and systemd for modern Linux distributions.
Download and Installation
- Sphinx Search v2.x: http://www.sphinxsearch.com/downloads.html
- Debian-based distributions can most likely install the package
sphinxsearchvia the package manager.
- PHP >= 7.x with SQLite extension (it is enabled by default as of PHP 5)
The recent installation requires a Linux operating system that uses systemd for script management and has a crontab setup that uses
/etc/cron.* directories as time divisions. The setup is targeted mainly at the Debian family of Linux distributions (ie: should be applicable flawlessly to Ubuntu).
- Use Extension Manager, or alternatively unpack plugin files into lib/plugins directory of your DokuWiki installation.
- Copy the file from
contrib/cron.daily/sphinx-rotate-grimoreinto the system folder at
/etc/cron.daily/- the file must be edited to adjust the variable at the top of the script
$PATH_TO_PLUGIN_DIRECTORYto point to the directory of the plugin. The file itself
sphinx-rotate-grimoreplaced in cron.daily will ensure that your search is updated on a daily basis. Other candidates include other cron directories with self explanatory names such as
/etc/cron.monthly, etc. If so desired, you can rename the file
sphinx-rotate-grimoreto any name you like. Finally, ensure that the file is made executable (for instance, by issuing the command
chmod +x /etc/cron.daily/sphinx-rotate-grimore).
- Copy the file from
/etc/systemd/systemand edit it such that the path
/var/www/grimore.org/lib/plugins/sphinxsearchpoints to the
sphinxsearchdirectory under your
lib/pluginsfolder of the DokuWiki installation.
- Issue the commands in sequence:
systemctl daemon-reload systemctl enable sphinx-searchd-grimore systemctl start sphinx-searchd-grimore
to enable the Sphinx
searchd service and start it.
In case the wiki to be installed to contains very long pages then it may be necessary to bump the memory allowance of PHP. A manifestation of this problem would be noticed by searching for for a term that is contained within a very long page. The search will take a significant amount of time and would yield a blank page.
This is solved by increasing PHP memory limit - you can use one of the following ways:
a) using php.ini
memory_limit = 1024M
b) inside php script
c) using .htaccess file
php_value memory_limit "1024M"