This is an old revision of the document!
Table of Contents
searchtext plugin
Compatible with DokuWiki
Searches pages rendered as text instead of raw wiki. Displays search result snippets from rendered text.
The missing download url means that this extension cannot be installed via the Extension Manager. Please see Publishing a Plugin on dokuwiki.org. Recommended are public repository hosts like GitHub, GitLab or Bitbucket.
Similar to docsearch, elasticsearch
This plugin searches pages rendered as text instead of raw wiki.
This plugin displays search result snippets from text.
This plugin requires:
- A text renderer, such as the text plugin
- A slight modification to add a FULLTEXT_SNIPPET_GETTEXT event to inc/fulltext.php if you wish to use the snippet capability (see below)
You will need a recent development version of DokuWiki to make this work!
Download
- http://cobs.rollerorgans.com/plugins/searchtext.zip – 2008-02-29, metadata bug fix, simplified event
- 2008-02-28, initial upload
Usage
There are two checkbox configuration items which appear at the bottom of the Admin Configuration Settings:
- Search in rendered text
- Display search result snippets from rendered text
You must edit the function ft_snippet() in ../inc/fulltext.php in order to provide a FULLTEXT_SNIPPET_GETTEXT event if you wish to use the snippet capability. A sample darcs patch would be:
[Allow plugin to insert search snippet text Todd Augsburger <todd@rollerorgans.com>**20080227000001 FULLTEXT_SNIPPET_GETTEXT Allow plugin to insert search snippet text ] { hunk ./inc/fulltext.php 254 - $text = rawWiki($id); + $text = trigger_event('FULLTEXT_SNIPPET_GETTEXT', $id, 'rawWiki'); }
Actual row in code may vary, for DokuWiki 2009-02-14 it's row 289.
Other plugins
This plugin requires a text renderer, such as text, available at http://cobs.rollerorgans.com/plugins/text.zip
Discussion
Where should the code go? Adding it to the end of fulltext.php doesn't work! Please let me know Laurence
I have the same question, where this code goes??? Abraham Saad Porto
Looks like that in the latest devel version the line is 289.
— Otto Vainio 2009/01/29 18:37
Yup that worked for me.