Table of Contents

ChangeLog

15-06-2019

  • Made the plugin compatible with the latest DokuWiki release.
  • Moved "Matching pagenames" to the top of the search and made the search results full width.
  • Branched out inline JS code to "js/search.js" and CSS code to "css/style.css".
  • Used CSS to override the "prev", "next" and "Search help" text-only links with icons.
  • Added the option to hide the Sphinx Search plugin version from the Dokuwiki configuration.
  • Bumped the text extracts to 500 words and 10 surrounding words and made these values configurable.
  • Removed deprecated options from "sphinx.conf" as per the Sphinx Search documentation.

About

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 bringing the code up to date, adding more configurable options, some broad refactorings of the code as well as some (subjectively) aesthetic changes.

Download

Code

The code can be checked out via Subversion from:

Requirements

Demonstration

Installation

The original installation instructions are preserved in this section to serve as a milestone. You can skip ahead to the recent installation instructions if you are running a fairly recent Linux/Debian-based machine.

Original

cd {Your_DokuWiki_Path}/lib/plugins/sphinxsearch/
indexer -c sphinx.conf dk_main
cd {Your_DokuWiki_Path}/lib/plugins/sphinxsearch/
searchd -c sphinx.conf

By default plugin is using 9312 as the searchd port, so make sure this port is free (if you have sphinx on other port, see #5).

1 10 * * * root {Your_DokuWiki_Path}/lib/plugin/sphinxsearch/indexer.php

Recent

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).

systemctl daemon-reload
systemctl enable sphinx-searchd-grimore
systemctl start sphinx-searchd-grimore

to enable the Sphinx searchd service and start it.

Notes on Modding

Part of the work being carried out is to sever CSS & HTML inlinecode from the PHP codebase into separate files. You should be able to edit css/style.css to change the aspect of the search results.

Issues and Workarounds

In case the wiki to be installed to contains very long pages then it may be necessary to bump the memory allowance of PHP - this can be done by editing the php.ini file and setting the variable memory_limit to a higher value. 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.

Support

This plugin is a fork of Ivinco Ltd.'s sphinxsearch by Wizardry and Steamworks and can be found on the Wizardry and Steamworks website @ http://grimore.org/dokuwiki/sphinxsearch