[ckan-dev] Action API, package_search sort by ratings_average
Adrià Mercader
adria.mercader at okfn.org
Wed Feb 6 12:11:14 UTC 2013
Hi Juma
Your search query is fine (only you should use desc if you want to
have the most rated first).
The only problem is that I don't think that the ratings feature is
used in latest versions of CKAN. It probably is available on the
search index because it has been kept there for compatibility.(I may
be wrong, so if anyone knows more about ratings please step in).
One alternative would be to set up the tracking and use "views_recent
desc" which is what we use for our "Popular" sort option.
Adrià
On 6 February 2013 11:17, Jacobsen, Jurma
<jurma.jacobsen at fokus.fraunhofer.de> wrote:
> Hi,
>
> we are wondering how to sort by "ratings_average" with Action API (CKAN
> v.2.0a).
> At present we try to achieve this via a call to action package_search
> (ckan.logic.action.get.package_search) with a sort param
> sort=ratings_average asc.
>
> Is this feature not yet available or is this there something wrong with this
> approach?
>
> Thank you in advance,
>
> Jurma Jacobsen
>
>
>
>
> _______________________________________________
> 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