Theme for the Open Data Portal for the City of Zurich.
This extension currently provides the following paster commands for cleanups:
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
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
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
- When facets are added in the future autocomplete-ogdzh-facet-search.js must be adapted to filter for these facets in its context search.