plugin:elasticsearch
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:elasticsearch [2019-07-04 14:38] – [Languages and fuzzy search] andi | plugin:elasticsearch [2024-02-15 12:01] (current) – Aleksandr | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : dokuwiki@cosmocode.de | email : dokuwiki@cosmocode.de | ||
- | type : action | + | type : action, cli |
- | lastupdate : 2019-07-04 | + | lastupdate : 2023-12-20 |
- | compatible : Greebo | + | compatible : Greebo, Hogfather, Igor, Jack Jackrum, Kaos |
depends | depends | ||
conflicts | conflicts | ||
- | similar | + | similar |
tags : search | tags : search | ||
- | downloadurl: | + | downloadurl: |
- | bugtracker : http:// | + | bugtracker : https:// |
- | sourcerepo : http:// | + | sourcerepo : https:// |
donationurl: | donationurl: | ||
Line 23: | Line 23: | ||
===== Installation ===== | ===== Installation ===== | ||
- | [[https:// | + | [[https:// |
:!: **External requirements: | :!: **External requirements: | ||
- | * Elasticsearch instance (latest | + | * [[https:// |
- | Install | + | Download and install |
+ | |||
+ | Configure and setup the plugin as outlined under [[# | ||
===== Examples/ | ===== Examples/ | ||
- | The simplest way to integrate an Elasticsearch engine is to: | + | Once installed, |
- | - enter the configuration of your Elasticsearch server in the Configuration Settings, | + | |
- | - create | + | All [[acl|access rights]] are respected, so users will only find pages for which they have at least read privileges. |
- | - let the index fill when users browse your Wiki. | + | |
+ | You can use the Advanced Search Tools to filter the results by namespace and date of the last modification. With [[plugin: | ||
- | You can use the Advanced Search Tools to filter the results by namespace and date of the last modification. All [[https:// | + | If the [[plugin:text|text plugin]] is installed, the rendered content of pages will be indexed in addition to raw wiki syntax. By default, search uses both fields. If you want to disable search in syntax, change the '' |
===== Configuration and Settings ===== | ===== Configuration and Settings ===== | ||
- | ==== Languages and fuzzy search | + | To integrate this plugin, you will need to do some configuration and run a few commands on the command line. |
+ | |||
+ | - enter the configuration of your Elasticsearch server in the [[plugin: | ||
+ | - optional: if your ES instance has security enabled (default setting since 8.0), enter the authentication username and password in [[plugin: | ||
+ | - copy and adjust a sample configuration for media indexing | ||
+ | - create the Index | ||
+ | - index your pages | ||
+ | |||
+ | ==== Creating the Index ==== | ||
+ | |||
+ | ==== Indexing media ==== | ||
+ | |||
+ | Copy the '' | ||
- | 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. | + | You can use the tools provided by ElasticSearch |
< | < | ||
- | ./ | + | ./ |
</ | </ | ||
- | If you have configured multiple languages using the [[plugin: | + | The name of the index is determined by the configuration. |
+ | |||
+ | === Re-creating the index === | ||
+ | |||
+ | Sometimes it is necessary to throw away the old index and replace it with a new one. This can be done via the same DokuWiki script with an additional parameter: | ||
+ | |||
+ | < | ||
+ | ./ | ||
+ | </ | ||
+ | |||
+ | :!: Make sure to re-create your index after upgrading the plugin to 2022-11-02. This will update index structure and index your media. | ||
+ | |||
+ | ==== 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. | ||
+ | |||
+ | If you have configured multiple languages using the [[plugin: | ||
+ | |||
+ | By default all available translation are searched. Users can change the language selection in Advanced Search Tools. | ||
- | At present there is no special filter that would let the user search | + | You can also enable translation detection in the plugin configuration. The option |
==== Index management ==== | ==== Index management ==== | ||
- | Create | + | The pages will be indexed automatically when browsed, just like with the DokuWiki |
+ | |||
+ | 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 [[:acl|ACLs]]). | ||
< | < | ||
- | ./ | + | ./ |
</ | </ | ||
- | The pages will be indexed when browsed. 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, for example to build the index for the first time or when you have made extensive changes (like moving | + | You can index pages or media separately: |
< | < | ||
- | ./ | + | ./ |
+ | ./ | ||
</ | </ | ||
+ | |||
+ | |||
+ | ===== Other plugins ===== | ||
+ | |||
+ | The [[plugin: | ||
===== Development ===== | ===== Development ===== | ||
+ | |||
+ | ==== Plugin integration ==== | ||
+ | |||
+ | Elasticsearch emits several events that can be used by other plugins to put their own data into the search index. Take a look at the implementation [[plugin: | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
==== Commit-Ticker ==== | ==== Commit-Ticker ==== | ||
Line 80: | Line 131: | ||
* search a specific language | * search a specific language | ||
* exact match (non-fuzzy search) | * exact match (non-fuzzy search) | ||
- | * integration of tags; tagged pages are shown on the results page but this bypasses Elasticsearch | ||
- | |||
plugin/elasticsearch.1562243925.txt.gz · Last modified: 2019-07-04 14:38 by andi