DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:sphinxsearch-was

sphinxsearch-was plugin

Compatible with DokuWiki

2018-05-17 Greebo, Frusterick Manners

plugin 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 go

Last updated on
2019-06-15
Provides
Action
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with search, sphinx

Features

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

Demonstration Website

Download and Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

See DokuWiki Sphinx Installation Instructions.

Requirements

    • Debian-based distributions can most likely install the package sphinxsearch via the package manager.
  • PHP >= 7.x with SQLite extension (it is enabled by default as of PHP 5)

Installation

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-grimore into 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_DIRECTORY to point to the directory of the plugin. The file itself sphinx-rotate-grimore placed 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.hourly, /etc/cron.monthly, etc. If so desired, you can rename the file sphinx-rotate-grimore to 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 contrib/etc/systemd/system/sphinx-searchd-grimore.service into /etc/systemd/system and edit it such that the path /var/www/grimore.org/lib/plugins/sphinxsearch points to the sphinxsearch directory under your lib/plugins folder 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.

Troubleshooting

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

	ini_set('memory_limit', '1024M');

c) using .htaccess file

	php_value memory_limit "1024M"

Discussion

emp

plugin/sphinxsearch-was.txt · Last modified: 2019-06-15 07:11 by gaffer

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki