No project description provided
Project description
ckanext-search-tweaks
Set of tools providing control over search results, sorting, etc.
Requirements
Compatibility with core CKAN versions:
CKAN version | Compatible? |
---|---|
2.8 and earlier | no |
2.9 | yes |
Installation
To install ckanext-search-tweaks:
-
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
-
Install it on the virtualenv
pip install ckanext-search-tweaks
-
Add
search_tweaks
to theckan.plugins
setting in your CKAN config file (by default the config file is located at/etc/ckan/default/ckan.ini
). -
Restart CKAN.
Config settings
# Which backend to use in order to collect information about dataset
# relevance for the particular search query. Possible values are:
# "redis-permanent", "redis-daily"
# (optional, default: redis-daily).
ckanext.search_tweaks.relevance.backend = redis-permanent
# How long(in days) information about dataset visits will be stored in order to
# update relevance of dataset in search query.
# (optional, default: 90).
ckanext.search_tweaks.relevance.daily.age = 90
# Solr boost function with $field placeholder that will be replaced by
# the correspoinding field name
# (optional, default: "scale(def($field,0),0,2)").
ckanext.search_tweaks.relevance.boost_function = recip($field,1,1000,1000)
# Prefix of the numeric field defined in Solr schema. This field will hold
# dataset's relevance for the given query.
# (optional, default: query_relevance_).
ckanext.search_tweaks.relevance.field_prefix = custom_score_
Developer installation
To install ckanext-search-tweaks for development, activate your CKAN virtualenv and do:
git clone https://github.com/DataShades/ckanext-search-tweaks.git
cd ckanext-search-tweaks
python setup.py develop
pip install -r dev-requirements.txt
Tests
To run the tests, do:
pytest --ckan-ini=test.ini ckanext/search_tweaks/tests
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for ckanext-search-tweaks-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00314399ea2bfe18baa400c6626b84e755c2cc293e3cd1eb6f53863179ddb522 |
|
MD5 | 36059c5d4eadd76adef33b525edb68df |
|
BLAKE2b-256 | 295d61e75f37c1b826c454c2922c48b8392875effec3ca805c2a3ee9753c7d2c |
Close
Hashes for ckanext_search_tweaks-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17e5c8e976ab53069054a1eed6a9b632d050e4c95fd4a66d10283702e2f7a696 |
|
MD5 | 5041d7832fe76fd6fb30ab2c4df53b32 |
|
BLAKE2b-256 | 6c6d511c387982e5bf5a21fa8f9637b5bda753aea7e300387d7a82e6f0702c41 |