ckanext-searchindexhook
This extension adds package data to the search index or deletes package data from the
search index by hooking into the IPackageController interface methods before_dataset_index
(for additions) and after_dataset_delete (for deletions).
Requirements
This extension requires at least a CKAN 2.9.* version plus an installation of the search index services for the used Elasticsearch in GovData (on GitHub or on Open CoDE).
Installation
To install ckanext-searchindexhook:
Activate your CKAN virtual environment, for example::
. /path/to/virtualenv/bin/activate
Install the ckanext-searchindexhook Python package into your virtual environment::
/path/to/virtualenv/bin/pip install -e git+git://github.com/GovDataOfficial/ckanext-searchindexhook.git#egg=ckanext-searchindexhook
or
/path/to/virtualenv/bin/pip install -e git+git://gitlab.opencode.de/fitko/govdata/ckanext-searchindexhook.git#egg=ckanext-searchindexhook
Modify the CKAN configuration file
Add search_index_hook to the ckan.plugins parameter in your CKAN
config file /path/to/ckan/config/production.ini).
To configure the extension add the following configuration settings
“`
; The endpoint of the search index webservice.
ckan.searchindexhook.endpoint = http://localhost:9070/index-queue/
; The HTTP basic auth credentials for the search index webservice.
; Colons are disallowed for usage in the username or password, the default is kermit:kermit.
ckan.searchindexhook.endpoint.credentials = username:password
; The base path of the target link to which the dataset name is appended
ckan.searchindexhook.targetlink.url.base.path = /web/guest/suchen/-/details/
; Name of the search index
ckan.se