- Python 49.5%
- HTML 35.4%
- JavaScript 9.7%
- CSS 5.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .github/workflows | ||
| ckanext | ||
| .gitignore | ||
| .isort.cfg | ||
| __init__.py | ||
| dev-requirements.txt | ||
| LICENSE | ||
| pip-requirements.txt | ||
| publiccode.yml | ||
| README.md | ||
| setup.cfg | ||
| setup.py | ||
| test.ini | ||
ckanext-stadtzh-theme
Theme for the Open Data Portal for the City of Zurich.
Command
This extension currently provides the following paster commands for cleanups:
Cleanup the datastore database.
Datastore currently does not delete tables when the corresponding resource is deleted. This command finds these orphaned tables and deletes its rows to free the space in the database. It is meant to be run regularly by a cronjob.
paster --plugin=ckanext-stadtzh-theme stadtzhtheme cleanup_datastore -c /etc/ckan/default/development.ini
Cleanup the file storage.
CKAN currently does not cleanup file storage when the corresponding resource is deleted. This command finds these orphaned storage files and deletes them along with the orphaned storage directories. It is meant to be run regularly by a cronjob.
paster --plugin=ckanext-stadtzh-theme stadtzhtheme cleanup_filestore -c /etc/ckan/default/development.ini
Logic for Autosuggestion
This extension currently provides one action to collect autosuggestions
from the solr handler /suggest:
The action is ogdzh_autosuggest with the paramters:
q: the search termcfq: the context: possible context are all facet names. They can be added usingAND.
Here are some examples for api calls to get the autosuggestions:
http://stadtzh.lo/api/3/action/ogdzh_autosuggest?q=velo&cfq=geodaten AND csv
http://stadtzh.lo/api/3/action/ogdzh_autosuggest?q=velo&cfq=geodaten
http://stadtzh.lo/api/3/action/ogdzh_autosuggest?q=velo&cfq=jpeg
The logic will only work if solr has generated autosuggestions. This can be tested with the command:
http://stadtzh.lo:8983/solr/ckan/suggest?wt=json&suggest.count=100&suggest.q=velo
Remarks
- When facets are added in the future autocomplete-ogdzh-facet-search.js must be adapted to filter for these facets in its context search.