Hi Humberto, Here's a Solr query that I've used for this purpose:
http://localhost/solr/statistics/select?wt=json&indent=true&facet=true&facet.field=id&facet.mincount=1&q=type:0+-isBot:true The facets section of the response will show the internal IDs of the most-downloaded files (type: 0) . If you want to know which items are associated with the most downloads, you would replace the facet.field parameter with 'owningItem' instead of 'id'. Solr doesn't store any item metadata, so here's a database query that will show you the titles and handles for a list of internal item IDs: SELECT text_value, handle, item_id FROM metadatavalue, handle WHERE (metadatavalue.item_id = handle.resource_id AND metadata_field_id = 64 AND item_id IN (<comma-separated list of internal item IDs>)) ORDER BY item_id; I hope this helps, Anthony On Monday, March 13, 2017 at 11:02:00 AM UTC-4, Humberto Blanco Castillo wrote: > > Hi, > I want to get the most downloaded items using solr queries, anyone knows > the way to do this? > > thanks > > Humberto Blanco > -- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/dspace-tech. For more options, visit https://groups.google.com/d/optout.
