os2web / os2web_search
Search functionality powered by SOLR
Installs: 1 495
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 9
Forks: 0
Open Issues: 0
Type:drupal-module
Requires
- drupal/facets: ^2.0
- drupal/search_api: ^1.16
- drupal/search_api_attachments: ^1.0@beta
- drupal/search_api_autocomplete: ^1.3
- drupal/search_api_solr: ^4.1
- drupal/search_api_spellcheck: ^4.0
- drupal/search_api_synonym: 1.x-dev@dev
This package is auto-updated.
Last update: 2024-11-06 14:08:20 UTC
README
//TODO:
- Can only be installed when EN and DA are present
- required search_api_attachments
- change index mode (search index)
OS2Web Search Drupal module
Module purpose
The aim of this module is to provide search functionality powered by SOLR.
How does it work
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
Install
-
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
Update
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
Synonyms activation
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 translation
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
Automated testing and code quality
See OS2Web testing and CI information
Contribution
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.