DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:sphinxsearch

sphinxsearch plugin

Compatible with DokuWiki

Lemming

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.

Last updated on
2014-03-04
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)

See the screenshot here:

Download and Installation

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

See DokuWiki Sphinx search tutorial.

Requirements

1. Sphinx Search (http://www.sphinxsearch.com/downloads.html) with the xmlpipe2 feature compiled in (may not be the case if you use a binary package from your distribution).

2. PHP5 with SQLite extension (it is enabled by default as of PHP 5)

Installation

1. Use Extension Manager, or alternatively unpack plugin files into lib/plugins directory of your DokuWiki installation.

2. Run Sphinx Search indexer to index your DokuWiki data for the first time. Note: you have to run it from lib/plugins/sphinxsearch directory. e.g.:

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

3. After indexer completes it's job, run searchd, e.g.:

$searchd -c sphinx.conf

4. To have your search results up-to-date, setup cronjob to periodically re-index your DokuWiki data, e.g.:

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

5. You can fine-tune the search behavior by editing the configuration files in conf/ dir

Troubleshooting

PHP allocate memory problem. 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"

Syntax and Usage

This plugin replaces DokuWiki's built-in search functionality, so you just have to use the search box in the header. Do not forget to setup re-indexing as said in the #4 above.

If you need any help with installation or maintenance - feel free to Contact us!

Support

Contact us if you need any new features or any help with deployment.

Discussion

Private Wiki

  • Hi and thanks for this plugin. I'm trying to make it work on my wiki.
    • My wiki is private and only logged users can read the pages.
    • So, the indexer process is unable to get the list of the pages ($pagesList = getPagesList(); in the xmlall.php script) unless I set ACL “* @ALL read”.
    • Is there a way to “login” the indexer at the begining of the indexing process?
  • Etienne M. (emauvaisfr [at] yahoo [dot] fr)
    1. It's can be fixed in the functions.php file, (line 208). Add array('skipacl' ⇒ true) as 3rd param to
      search($data,$conf['datadir'],'search_allpages',array('skipacl' => true),''); 

      Fernando de Jesus Leal Flores (f.lealflores [at] gmail [dot] com) 2010/05/24 11:16

  • In such configuration, will it present all results irrespective of their ACL or does it still check ACL before showing the search results?

Indexing Problem

  • Hi, thank's to you also. When indexing my WikiI get the following error :

ERROR: index 'dk_main': source 'dk_main': XML parse error: not well-formed (invalid token) (line=15649, pos=146, docid=4178398627).

  1. any Ideas ??
    1. Try to use the latest version - we fixed some serious bugs in 0.3 version. Contact us if you still see problems with the latest version.

Screenshots

Can someone place some printscreens of the search results? Or can I try this plugin somewhere?

  1. Hi, take a look at the screenshot here: screenshot: DokuWiki Sphinx search in action

Taking a Step Back

Hi, I'm stuck with these steps:

  1. installing Sphynx search on my server
    1. Is the process indeed as difficult as this page makes it out to be?
  2. indexing process (how to send commands to the server such as “$cd …”?)
    1. ….$cd is not a command, only cd because $ is the user prompt…

Thank you in advance.

Add command line at system startup

Collected 0 Docs (2013-02-28)

using config file 'sphinx.conf'...
indexing index 'dk_main'...
collected 0 docs, 0.0 MB
total 0 docs, 0 bytes
total 0.000 sec, 0 bytes/sec, 0.00 docs/sec
total 1 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 5 writes, 0.000 sec, 0.5 kb/call avg, 0.0 msec/call avg

Where's the most likely misconfiguration? – MK, 2013/02/28 15:44

Indexing started working after I did the following?

Add to /conf/local.php:

define('DOKU_URL', 'http://yourserverurl.com/');

(Although I don't see why it is related.) – MK 2013/02/28 17:11

plugin/sphinxsearch.txt · Last modified: 2023-10-30 23:54 by Klap-in

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