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_tweaksto theckan.pluginssetting 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
Metadata
Release files for ckanext-search-tweaks 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ckanext-search-tweaks-0.0.2.tar.gz | 23.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ckanext_search_tweaks-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.0 kB
Release files / ckanext-search-tweaks-0.0.2.tar.gz
| Download URL | ckanext-search-tweaks-0.0.2.tar.gz |
|---|---|
| Size | 23.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b08587fc477615df1d94c0009b0facfab8892a857f3ce48cb217752b191e32c7
|
|
BLAKE2b-256 checksum How to use checksums |
3267227c292418ab446b12757ed91e5d3584db210d1f44c5c7808813c1651358
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|
Release files / ckanext_search_tweaks-0.0.2-py3-none-any.whl
| Download URL | ckanext_search_tweaks-0.0.2-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81bf0720d6ae7bacef92cc0d8f1804b63c4136db4dfd8d198f8b27dcaf230e2b
|
|
BLAKE2b-256 checksum How to use checksums |
7d874baea510f2c4a1276d3fd74028606f35fe75391b4d576e516bc45715475a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|