Overview
IIIF Search is a module for Omeka S that adds a IIIF Search API for full-text search.
https://github.com/symac/Omeka-S-module-IiifSearch
This time, I modified the above module. A pull request has been submitted, but the modified module is available in the following repository.
https://github.com/nakamura196/Omeka-S-module-IiifSearch
Specifically, the minimum query string length was set to 1 character, but I made it configurable through a settings form. The default was set to 3 characters, which prevented searching with a single kanji character, so this modification was made.
Modification Details
The following four files were modified.
- config/module.ini
- src/Form/ConfigForm.php
- Module.php
- src/View/Helper/IiifSearch.php
config/module.ini
I changed configurable to true. This causes the following settings screen to be displayed after module installation.

src/Form/ConfigForm.php
The display content on the above settings screen is achieved by editing src/Form/ConfigForm.php.
A configuration value for iiifsearch_minimum_query_length has been added.
Module.php
The settings for the above screen are implemented by modifying Module.php.
Specifically, the getConfigForm and handleConfigForm forms have been added.
Additionally, install and uninstall functions have been added to configure processing during module installation and uninstallation, handling the initial value setting and deletion of iiifsearch_minimum_query_length.
src/View/Helper/IiifSearch.php
Finally, src/View/Helper/IiifSearch.php is modified. Where minimumQueryLength was previously set to 3, the configuration value is now read using $this->view->setting('iiifsearch_minimum_query_length') and used as the value for minimumQueryLength. This means that, for example, when dealing with Japanese text, setting minimumQueryLength to 1 in the settings screen enables searching from a single character.
Summary
I hope this serves as a useful reference when using this module, particularly for searching Japanese text. I also hope it serves as a reference for Omeka S module development.