cosmocode / dokuwiki-plugin-elasticsearch

Integrate an external Elasticsearch engine into DokuWiki
https://www.dokuwiki.org/plugin:elasticsearch
4 stars 6 forks source link

Make max_analyzed_offset configurable and apply it on search #20

Open andreasferber opened 2 months ago

andreasferber commented 2 months ago

Elasticsearch has a per-index setting index.highlight.max_analyzed_offset that governs how much of the indexed data is analyzed for search result snippet highlighting. Searches have a corresponding max_analyzed_offset option. Without that search option if a search finds results in indexed media files that are larger than the default setting (about 1MB) you get an error.

This PR makes the index setting configurable and ensures that a matching option is set when querying the index to avoid running into abovementioned error condition.