<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>CosmoCode Blog – Anna Dabrowska</title><description>Blog posts by Anna Dabrowska</description><link>https://www.cosmocode.de/</link><item><title>New Release of the DokuWiki Elasticsearch Plugin</title><link>https://www.cosmocode.de/en/blog/adab/20261019-dokuwiki-elasticsearch-plugin/</link><guid isPermaLink="true">https://www.cosmocode.de/en/blog/adab/20261019-dokuwiki-elasticsearch-plugin/</guid><description>The new Elasticsearch Plugin release brings search filters, autocompletion, typo suggestions, image previews, faster ACL updates and Apache Tika 4 support to the DokuWiki community.</description><pubDate>Mon, 19 Oct 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;We would like to announce a new version of the &lt;a href=&quot;https://www.dokuwiki.org/plugin:elasticsearch&quot;&gt;Elasticsearch Plugin&lt;/a&gt;.
This version has been available for a while to our partners in the
&lt;a href=&quot;https://www.cosmocode.de/en/leistungen/wiki/dokuwiki-partnership&quot;&gt;DokuWiki Business Plugin Partner Program&lt;/a&gt; and is now available to the wider
DokuWiki community.&lt;/p&gt;
&lt;h2 id=&quot;why-elasticsearch&quot;&gt;Why Elasticsearch?&lt;/h2&gt;
&lt;p&gt;As a bit of &lt;strong&gt;background&lt;/strong&gt;, let me tell you &lt;strong&gt;why&lt;/strong&gt; we have been working on Elasticsearch in the past few years. The
builtin fulltext search works just fine in most cases and the advanced options allow for basic filtering and sorting of
the results. But it has some &lt;strong&gt;shortcomings&lt;/strong&gt;: search terms have to be typed exactly as they occur in the page
(specifically in the page syntax), different languages are not recognized, media files are not included in the
results, namespaces can be filtered only on the top level, only the first 15 hits display preview snippets and the rest
is just a long list of links. On large wikis, the search index can get slow.&lt;/p&gt;
&lt;p&gt; &lt;img src=&quot;https://www.cosmocode.de/_astro/elasticsearch-core-search.B-bN6nXf_ZfLHiL.webp&quot; alt=&quot;DokuWiki’s builtin fulltext search showing raw page syntax in the result snippets&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1620&quot; height=&quot;1489&quot;&gt;&lt;/p&gt;
&lt;p&gt;This is where a &lt;strong&gt;specialized search engine&lt;/strong&gt; such as Elasticsearch comes in. The plugin connects your DokuWiki to an
&lt;strong&gt;Elasticsearch server&lt;/strong&gt;. The search engine can handle the indexing much more efficiently and intelligently than
DokuWiki’s core tools. It is built on the concept of &lt;strong&gt;human language&lt;/strong&gt;, so it knows that “type” and “typing” belong to
the same semantic scope. It manages document content in &lt;strong&gt;multiple dimensions&lt;/strong&gt;, e.g. source syntax, rendered text,
language, user permissions, namespace hierarchy, tags. Those dimensions are not fixed and can even be &lt;strong&gt;extended in the
future&lt;/strong&gt;. In an earlier version of the plugin we did just that and added “document type” to differentiate between wiki
pages and media files when we integrated &lt;strong&gt;media search&lt;/strong&gt; (you still need tools to extract text from the media files).&lt;/p&gt;
&lt;p&gt; &lt;img src=&quot;https://www.cosmocode.de/_astro/elasticsearch-word-forms.B9GakPm9_Z2mij5l.webp&quot; alt=&quot;A search for “playing” also finds “plays”, “played” and “play”&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;2048&quot; height=&quot;874&quot;&gt;&lt;/p&gt;
&lt;p&gt; &lt;img src=&quot;https://www.cosmocode.de/_astro/elasticsearch-filters.Duq3Os9q_26Hxz2.webp&quot; alt=&quot;Search results narrowed down by tag and language, with the tag filter expanded&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1148&quot; height=&quot;406&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;a-better-search-interface&quot;&gt;A better search interface&lt;/h2&gt;
&lt;p&gt;The latest release improves the &lt;strong&gt;search interface&lt;/strong&gt; with filters on the results page. Results can now be narrowed by
namespace, language and file type, and active filters remain in place when searching again. The search field also
supports &lt;strong&gt;autocompletion&lt;/strong&gt;, the plugin can suggest &lt;strong&gt;corrected queries&lt;/strong&gt; for likely typos, and media results now
include &lt;strong&gt;image previews&lt;/strong&gt;. The results page, pagination and styling have also been reworked to fit better with
templates.&lt;/p&gt;
&lt;p&gt; &lt;img src=&quot;https://www.cosmocode.de/_astro/elasticsearch-autocomplete.B4JP93He_f6yHq.webp&quot; alt=&quot;Autocompletion suggestions while typing “musi”&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;1289&quot; height=&quot;494&quot;&gt;&lt;/p&gt;
&lt;p&gt; &lt;img src=&quot;https://www.cosmocode.de/_astro/elasticsearch-did-you-mean.BFQ51IDu_UV3k9.webp&quot; alt=&quot;A “Did you mean” suggestion for the misspelled query “music notaton”&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;701&quot; height=&quot;338&quot;&gt;&lt;/p&gt;
&lt;p&gt; &lt;img src=&quot;https://www.cosmocode.de/_astro/elasticsearch-media-results.BKcfjWxZ_ZBC82c.webp&quot; alt=&quot;Media files in the search results with image previews&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; width=&quot;2048&quot; height=&quot;725&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;indexing-improvements&quot;&gt;Indexing improvements&lt;/h2&gt;
&lt;p&gt;While Elasticsearch has always respected ACL rules, now also &lt;strong&gt;ACL changes&lt;/strong&gt; are reflected in the search index faster.
Previously, a page’s indexed permissions were only updated when the page itself was edited. Now pages are reindexed
after ACL changes when they are next viewed. Pages that are not opened keep their previous indexed permissions until
the command-line indexer is run. Media files are still reindexed only on upload or from the command line.&lt;/p&gt;
&lt;p&gt;The release adds support for &lt;strong&gt;Apache Tika 4&lt;/strong&gt;, fixing content indexing for PDF and Word documents with newer Tika
versions. Older Tika versions continue to work. It also fixes media language detection with the Translation Plugin,
improves namespace filtering for subnamespaces and hyphenated names, converts Tika HTML output to plain text, and
handles very long documents more reliably.&lt;/p&gt;
&lt;p&gt;If the Elasticsearch server is temporarily unavailable, the wiki now &lt;strong&gt;remains usable&lt;/strong&gt;. Indexing errors during normal
wiki usage no longer make the whole wiki fail.&lt;/p&gt;
&lt;h2 id=&quot;under-the-hood&quot;&gt;Under the hood&lt;/h2&gt;
&lt;p&gt;Internally, the plugin &lt;strong&gt;no longer depends on an external library&lt;/strong&gt;. It now uses a small builtin custom client and
query builder, reducing the bundled vendor code considerably. The release also adds tests for query building, query
parsing and filters.&lt;/p&gt;
&lt;h2 id=&quot;upgrading&quot;&gt;Upgrading&lt;/h2&gt;
&lt;p&gt;When upgrading, please &lt;strong&gt;recreate&lt;/strong&gt; the Elasticsearch index and &lt;strong&gt;reindex&lt;/strong&gt; the whole wiki. This is required because
the namespace field mapping changed, and because the Tika and language fixes require media files to be indexed again.&lt;/p&gt;
&lt;p&gt;For &lt;strong&gt;developers&lt;/strong&gt; extending the plugin: &lt;code&gt;PLUGIN_ELASTICSEARCH_QUERY&lt;/code&gt; has been removed, and
&lt;code&gt;PLUGIN_ELASTICSEARCH_FILTERS&lt;/code&gt; now works differently. Default filters are added inside the event, so handlers can
modify or replace them. Plugins using these events should be checked before upgrading.&lt;/p&gt;
&lt;h2 id=&quot;thank-you&quot;&gt;Thank you&lt;/h2&gt;
&lt;p&gt;Last but not least: this community release has been made possible by CosmoCode’s customers and partners. If your
company benefits from using DokuWiki’s Open Source plugins, please consider joining the ranks of our
&lt;a href=&quot;https://www.cosmocode.de/en/leistungen/wiki/dokuwiki-partnership&quot;&gt;Partners&lt;/a&gt; to support future maintenance and development of this and other
plugins.&lt;/p&gt;</content:encoded><author>dabrowska@cosmocode.de (Anna Dabrowska)</author></item></channel></rss>