Skip to main content

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:

  1. Activate your CKAN virtual environment, for example:

     . /usr/lib/ckan/default/bin/activate
    
  2. Install it on the virtualenv

     pip install ckanext-search-tweaks
    
  3. Add search_tweaks to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/ckan.ini).

  4. 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.search_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.search_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

AGPL

Metadata

Release files for ckanext-search-tweaks 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ckanext-search-tweaks 0.0.1
File Size Uploaded
ckanext-search-tweaks-0.0.1.tar.gz 22.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ckanext-search-tweaks 0.0.1
File Interpreter ABI Platform
ckanext_search_tweaks-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 46.6 kB

Release files / ckanext-search-tweaks-0.0.1.tar.gz

Download URL ckanext-search-tweaks-0.0.1.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1a8332c36293b942711bf8ba3c46a7a9ea0310901d7f3b41b141f10d18b210a4
BLAKE2b-256 checksum
How to use checksums
277be400dbbb9e7a7d5f72c2eb53124f1a22fabe837a57d44017b2275347e971
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.1-py3-none-any.whl

Download URL ckanext_search_tweaks-0.0.1-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2f0d5e804f7c49f54876d224590939c7293892b9cd4a7cf7725c8e11bc530ee
BLAKE2b-256 checksum
How to use checksums
21b5547ac6976e012d0ba44408e8e79fe5596eae344a2a816e1c79a528e13e2f
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 history Release notifications | RSS feed

1.0.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.12

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page