//TODO:
- Can only be installed when EN and DA are present
- required search_api_attachments
- change index mode (search index)
The aim of this module is to provide search functionality powered by SOLR.
After enabling search is available on the search page, as well as exposed form is added to 4 regions: Megamenu - search, Header - search, Header - below (front page only), Content (search page only).
Search page: /s
-
Create the SOLR core. Read manual.
-
Make sure you have both
english
anddanish
language in your installation/admin/config/regional/language
. -
Module is available to download via composer.
composer require os2web/os2web_search drush en os2web_search
-
After activation finish the set up here:
admin/config/search/search-api/server/os2web_search_server/edit
The following fields need to be manually inserted:
- Solr host
- Solr core
Updating process for OS2Web Nemlogin module is similar to usual Drupal 8 module. Use Composer's built-in command for listing packages that have updates available:
composer outdated os2web/os2web_search
In order to use search synonyms for search those actions need to be done:
-
Enable synonyms module:
drush en search_api_synonym
-
Add some synonyms:
admin/config/search/search-api-synonyms
-
Make sure your cron is running
-
Copy the script
os2web_search/scripts/synonyms_deploy.sh.example
into any directory outside Drupal and execute it each time right after the cron.Script requires those variables to be set:
-
synonymdir=[path to synonyms]
Full path to synonyms export folder location e.g. /var/www/os2web.dk/web/sites/default/files/synonyms/
-
solrconfig=[path to SOLR core configuration]
Full path to SOLR core config folder e.g. /opt/solr/server/solr/sik/conf/
-
[SOLR Core]
SOLR Core name
-
The script will work in the following way:
- It checks the synonyms export location
- If it has some files (matching the pattern), those files are moved to SOLR config location and renamed
- After that the SOLR core is reloaded so that synonyms are active
Module's main language is English but Danish language is fully supported.
When extending this module add your translations to the corresponding *.po files located modules/contrib/os2web_search/translations/
and run the following to update translations:
drush locale-check
drush locale-update && drush cr
See OS2Web testing and CI information
Project is opened for new features and os course bugfixes. If you have any suggestion or you found a bug in project, you are very welcome to create an issue in github repository issue tracker. For issue description there is expected that you will provide clear and sufficient information about your feature request or bug report.