Facet Scheming Extension (ARCHIVED)
⚠️ This repository was archived on August 21, 2024 and is now read-only.
ckanext-facet_scheming provides functions and templates specially developed to extend the search functionality in CKAN for custom schemas. It uses the fields defined in a scheming file to provide a set of tools for faceting, with icon support in labels.
Requirements
- Custom GeoDCAT-AP ckanext-scheming extension
- CKAN 2.9 (2.8 and earlier not tested, 2.10 not yet supported)
Features
- Custom facet list based on scheming fields
- AND/OR facet search operator selection
- Icon support for facet values and choices
- Multiple choice icon display snippets
- Select icon form snippets
- Helper functions for facet operations
- Organization and group custom facets support
Installation
git clone https://github.com/OpenDataGIS/ckanext-facet_scheming.git
cd ckanext-facet_scheming
pip install -e .
pip install -r requirements.txt
Add facet_scheming to ckan.plugins, then clear and rebuild Solr index.
Configuration
ckan.plugins = facet_scheming
# List of fields in scheming file to use for faceting
facet_scheming.facet_list = theme groups theme_es dcat_type owner_org res_format publisher_name
# Default facet operator (OR if not defined)
facet_scheming.default_facet_operator = AND
# Icons directory (images/icons if not defined)
facet_scheming.icons_dir = images/icons
# Enable custom facets for organizations/groups
facet_scheming.organization_custom_facets = true
facet_scheming.group_custom_facets = true
Solr Configuration
Requires adding multivalued fields to Solr schema for each field used in faceting.
Note
Repository is archived. See mjanez/ckanext-scheming for continued development.