[ckan-dev] Sort metadata fields.

Joe Tsoi joe.tsoi at okfn.org
Mon Jan 27 12:59:49 UTC 2014


You'd probably want to add your custom field to the solr schema and
have your plugin implement IPackageController.before_index, althougth
I've never  had to try this myself

You might also want to have your plugin implement
IPackageController.before_search to add your custom sorting fields to
the ui, but you can probably just get away with adding the sort
parameter to the solr query to start with

I think stats-canada has done
this.https://github.com/open-data/ckanext-canada so you might want to
speak to wardi on IRC, otherwise this might make a good subject for a
tutorial.

On 27 January 2014 12:34, Henrik Aagaard Sørensen <BU1G at tmf.kk.dk> wrote:
> Thank you for the answer. I’m interested in a more custom sort, so if it
> would be possible to add sort_order or something similar to each
> metadata-field, it would be great? Order by alphabet etc. does not work.
>
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>



More information about the ckan-dev mailing list