[ckan-dev] IFacets plugin interface

Adrià Mercader adria.mercader at okfn.org
Fri Feb 15 17:47:04 UTC 2013


Sounds good

What config options are you referring to?

1. search.facets = groups tags res_format responsible-party frequency
source_type
2. search.facets.responsible-party.title = Organizations

Perhaps I would keep 1. making clear that these affect to all searches
made, and that if you want a more efficient handlint you should use
IFacets
I'm happy to drop 2.

Will there be a way for defining facets for a particular dataset type?
My use case: the harvester extension has a custom dataset type for
harvest sources and on the listing page you can facet by frequency or
type (two extras). How would I add these only to the harvest_source
type and not the default dataset (or I can't)

On 15 February 2013 12:24, Toby Dacre <toby.okfn at gmail.com> wrote:
> Facets are a problem in ckan.
>
> Currently they are changed via config options and the
> IPackageController.update_facet_titles() translation of facet names is not
> fully supported
>
> The plan is to add a IFacet plugin interface to allow greater flexibility so
> that facets can be defined for
>
> Datasets
> Groups
> Organizations
> Bulk Updates
>
> a function would be called on the interface for each of these to get the
> facets and the display name
>
> eg
>
> def facets_datasets():
>     return {'tags': _('Tags'),
>               'groups': _('Groups'),}
>
>
> the list may expand later if needed
>
> IPackageController.update_facet_titles() will be removed - this was added in
> 2.0 and I think Sven is the only current user and switching to the new
> interface would be trivial.
>
> Do we also want to remove all the config options and just do things via an
> Extension?
>
> the issue is https://github.com/okfn/ckan/issues/400
>
> feedback?  I plan to do this over the next week.
>
> cheers
> Toby
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>




More information about the ckan-dev mailing list