Extension Sitesearch


Extension Basics

Title
Sitesearch
Name
ckanext-sitesearch
Type
Public extension
Description
Index different CKAN entities in Solr, not just datasets
CKAN versions
Download-Url (zip)
Last commit
3 years ago (2022-12-07 11:41:17)
Url to repo
Category
Authentication & Security


Background Infos

Description (long)
Show details

ckanext-sitesearch

Tests Code Coverage

Index different CKAN entities in Solr, not just datasets

Requirements

This extension requires CKAN 2.9 or higher and Python 3

Features

Search actions

ckanext-sitesearch allows Solr-powered searches on the following CKAN entities:

Entity Action Permissions Notes
Organizations organization_search Public
Groups group_search Public
Users user_search Sysadmins only
Pages page_search Public (individual page permissions apply) Requires ckanext-pages

All *_search actions support most of the same paramters that package_search, except the include_* ones. That includes q, fq, rows, start, sort and all the facet* ones.

In all actions, the output matches the one of package_search as well, an object with count, results and search_facets keys. results is a list of the corresponding entities dict (ie the result of organization_show, user_show etc):

{
    "count": 2,
    "results": [
        <validated data dict 1>,
        <validated data dict 2>,
    ],
    "search_facets": {
        <facet_field_1>: {
            "items": {
                "count": 1,
                "display_name": "example",
                "name": "example"
            },
            "title: "example"
        }
    }
}

Site search

Additionally, the plugin registers a site_search action that performs a search across all entities that the user is allowed to, including datasets. Results are returned in an object

Version
Version release date
(not set)
Contact name
(not set)
Contakt email
(not set)
Contact Url
(not set)


Installation Guide

Configuration hints

To install ckanext-sitesearch:

  1. Activate your CKAN virtual environment, for example:

    . /usr/lib/ckan/default/bin/activate

  2. Clone the source and install it on the virtualenv

    git clone https://github.com/okfn/ckanext-sitesearch.git cd ckanext-sitesearch pip install -e .

  3. Add sitesearch 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

Plugins to configure (ckan.ini)
sitesearch
CKAN Settings (ckan.ini)
DB migration to be executed
(not set)
<< back to Extensions