Thank you Helix,

Now, I am doing some progress. 
First, I find all the items under a certain community, let's say, community 
251.
With this query 
http://localhost:1234/solr/search/select?q=search.resourcetype:2+and+location.comm:251&fq=discoverable:true&fq=withdrawn:false&fl=search.uniqueid+handle+location.coll&wt=csv&indent=true

I get some results:

search.uniqueid,handle,location.coll
2-19076,10045/16013,"1684,1024,545"
2-19074,10045/16011,1684
2-19077,10045/16014,1684
2-15382,10045/13384,1367
2-28824,10045/23756,731
2-32318,10045/26477,3395
2-33005,10045/26958,3395
2-32309,10045/26471,3395
2-32312,10045/26473,3395
2-32311,10045/26472,3395

etc....




Now, for a the same community I am trying to get the stastistics hits but I 
don't know how to.

I've tried this query but with no results:
http://localhost:1234/solr/statistics/select?q=type:4+and+id:251&fq=statistics_type:view&fq=-isBot:true&fl=uid+score+&df=id&wt=xml&indent=true&facet=true&facet.field=id

Here is  the output:
  

<?xml version="1.0" encoding="UTF-8"?><response>
<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">3</int>
  <lst name="params">
    <str name="q">type:2 and id:19076</str>
    <str name="df">id</str>
    <str name="facet.field">id</str>
    <str name="indent">true</str>
    <str name="fl">uid, score </str>
    <arr name="fq">
      <str>statistics_type:view</str>
      <str>-isBot:true</str>
    </arr>
    <str name="wt">xml</str>
    <str name="facet">true</str>
    <str name="_">1473766954959</str>
  </lst></lst><result name="response" numFound="0" start="0" 
maxScore="0.0"></result><lst name="facet_counts">
  <lst name="facet_queries"/>
  <lst name="facet_fields">
    <lst name="id">
      <int name="101142">0</int>
      <int name="101804">0</int>
      <int name="1024">0</int>
      <int name="103145">0</int>
      <int name="103259">0</int>
      <int name="103266">0</int>
      <int name="103303">0</int>
      <int name="103304">0</int

................

              <int name="49802">0</int>

      <int name="49803">0</int>
    </lst>
  </lst>
  <lst name="facet_dates"/>
  <lst name="facet_ranges"/>
  <lst name="facet_intervals"/></lst></response>


What am I doing wrong?


Regards,



On Friday, September 9, 2016 at 3:18:20 PM UTC+2, helix84 wrote:
>
> You'll find general information about direct Solr queries on this wiki 
> page: 
>
> https://wiki.duraspace.org/display/DSPACE/Solr 
>
> Also, two of the example queries can be combined to give you almost 
> the exact answer you want. The thing is that the statistics data 
> resides in a different index (statistics) than the hierarchy data 
> (search), so either do the combining in the code running the query or 
> look into "Multicore join queries", also mentioned on that wiki page. 
>
>
> Regards, 
> ~~helix84 
>
> Compulsory reading: DSpace Mailing List Etiquette 
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette 
>
>
>
> On Fri, Sep 9, 2016 at 3:10 PM, Rafa Carreres <rcar...@gmail.com 
> <javascript:>> wrote: 
> > Hi, 
> > 
> > I need to find out by means of a SOLR direct query "Top 5 of most viewed 
> > items in a certain collection or community". 
> > 
> > It doesn't look like a complicated query but I have no idea about this. 
> > Besides, I've found it hard to get information about direct SOLR 
> queries. 
> > 
> >  I would really appreciate some help. 
> > 
> > Regards, 
> > 
> > -- 
> > 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 dspace-tech...@googlegroups.com <javascript:>. 
> > To post to this group, send email to dspac...@googlegroups.com 
> <javascript:>. 
> > Visit this group at https://groups.google.com/group/dspace-tech. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
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 dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to