This is an old revision of the document!
Table of Contents
elasticsearch Plugin
Compatible with DokuWiki
Greebo
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Similar to docsearch, searchtext
Installation
External requirements: This plugin requires the following additional components that must be installed separately:
- Elasticsearch instance (latest supported version 7.1)
Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.
Configure and setup the plugin as outlined under Configuration below.
Examples/Usage
Once installed, the plugin will automatically react on the ?do=search action, replacing DokuWiki's builtin search.
All access rights are respected, so users will only find pages for which they have at least read privileges.
You can use the Advanced Search Tools to filter the results by namespace and date of the last modification.
Configuration and Settings
To integrate this plugin, you will need to dp some configuration and run a few commands on the command line.
- enter the configuration of your Elasticsearch server in the Configuration Settings
- create the Index
- create the Language Mappings
- index your pages
Creating the Index
You can use the tools provided by ElasticSearch to create the index or simply run the provided command line tool to do so:
./bin/plugin.php elasticsearch createindex
The name of the index is determined by the configuration.
Languages and fuzzy search
One of the main reasons for using a dedicated search engine is that it provides advanced features, such as fuzzy search. To enable it, the pages must be indexed using a linguistic analyzer in the appropriate language. Make sure to create the language mapping using the CLI tool before filling the index.
./bin/plugin.php elasticsearch createlangmapping
If you have configured multiple languages using the Translation plugin, they will be mapped as well.
At present there is no special filter that would let the user search in a particular language only. However, it is possible to filter the results by language namespaces.
Index management
The pages will be indexed automatically when browsed, just like with the DokuWiki builtin mechanism. When a page is updated, its entry in the index will be updated as well.
You can also force indexing the whole Wiki at once using the CLI tool. This is recommended when you build the index for the first time or when you have made extensive changes (like moving pages or updating the ACLs).
./bin/plugin.php elasticsearch index
Development
Commit-Ticker
- Version upped (2023-12-20 23:50)
- Merge pull request #19 from cosmocode/security (2023-12-20 14:37)
- Add elastic security (2023-12-20 13:58)
- Update libraries (2023-12-20 10:36)
- Version upped (2022-11-10 23:50)
- use new DokuWiki logger (2022-11-10 14:14)
- Title may not be set for pages (2022-11-10 14:13)
- Version upped (2022-11-02 12:58)
Releases:
- 2023-12-20 by splitbrainVersion upped
- 2022-11-10 by splitbrainVersion upped
- 2022-11-02 by anndaVersion upped
- 2021-11-01: New field doctype works with not updated old index by anndaPreviously missing doctype caused all links to be media links
- 2021-06-10 by anndaRespect hidepages configuration
- 2021-06-09 by anndaAdd configuration option to disable DokuWiki's quick search
- 2021-06-07 by splitbrainVersion upped
- 2021-04-27 by splitbrainVersion upped
ToDo/Wish List
- search a specific language
- exact match (non-fuzzy search)
- integration of the tagging plugin; tagged pages are shown on the results page but this bypasses Elasticsearch