
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 term
cfq: the context: possible context are all facet names. They can be added using AND.
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:
“