--- just resending this with a more appropriate subject line ---

Thanks Monika,

I can see what this particular query is doing, however I'm wondering if you 
know of any resources for someone like me who is just starting out with solr 
queries - especially with reference to DSpace. I know the wiki has some 
examples but I thought there'd be some comprehensive documentation...somewhere?

For example, how do you know what the allowable values are for facet.field (and 
where can these be configured, and how do you configure them)? The same with 
"type" etc. And how do you know what the parameter names actually are (isBot, 
owningComm etc)?

Any clues would be very much appreciated.

Thanks again,
Gary


Gary Browne | Technical Manager Developments
University of Sydney Library
THE UNIVERSITY OF SYDNEY
Level 1, Fisher Library F03 | The University of Sydney | NSW | 2006
T +61 2 9351 5946 | M +61 405 647 868
E gary.bro...@sydney.edu.au<mailto:gary.bro...@sydney.edu.au>
On 03/07/15 00:14, Monika C. Mevenkamp wrote:
use the fq parameter to restrict to a time range

eg   fq=time:[2015-01-01T00%3A00%3A00.000Z+TO+NOW]

the query below looks at ORIGINAL  bitstreams in a give collection downloaded 
at least once
excluding bot queries as well as query from the given ips and downloads from 
users that were logged in


http://localhost:18082/solr/statistics/select?wt=json&indent=true&rows=0&facet=true&facet.mincount=1&facet.field=id&fq=time:[2015-01-01T00%3A00%3A00.000Z+TO+NOW]&q=NOT+epersonid%3A%5B%22%22+TO+*%5D+isBot:false+owningComm:67+type:0+bundleName:ORIGINAL+-ip:%2810.6.61.26+OR+128.112.66.66%29

the response header


responseHeader":{
    "status":0,
    "QTime":1857,
    "params":{
      "facet":"true",
      "facet.mincount":"1",
      "indent":"true",
      "q":"NOT epersonid:[\"\" TO *] isBot:false owningComm:67 type:0 
bundleName:ORIGINAL -ip:(10.6.61.26 OR 128.112.66.66)",
      "facet.field":"id",
      "wt":"json",
      "fq":"time:[2015-01-01T00:00:00.000Z TO NOW]",
      "rows":"0"}},
  "response":{"numFound":205152,"start":0,"docs":[]
  },

I wrote a jruby script to do stats for a particular community - if you are 
interested see https://github.com/akinom/dscriptor/tree/master/statistics

Monika

—
Monika Mevenkamp
Digital Repository Infrastructure Developer
Phone: 609-258-4161
333C 701 Carnegie, Princeton University, Princeton, NJ 08544

On Jul 2, 2015, at 2:10 AM, Gary Browne 
<gary.bro...@sydney.edu.au<mailto:gary.bro...@sydney.edu.au>> wrote:

Hi all,

I'm trying to figure out how to limit solr queries by date. I found this 
snippet online:

http://mydspace.org/solr/statistics/select?bundleName:ORIGINAL&facet.date.start=NOW/MONTH/DAY-6MONTHS&facet.date.end=NOW&facet.date.gap=1MONTH+AND+type:0+bundleName:ORIGINAL

it fails in my browser (yes, other solr searches work).

I'm trying to come up, for starters, with a solr search query for top X items 
visited in the last X months.

Can anyone point me in the right direction here, even to some documentation 
(I've done a lot of googling but nothing I've found so far helps with this 
question).

THanks,
Gary

--
Gary Browne | Development Programmer
University of Sydney Library
THE UNIVERSITY OF SYDNEY
Level 1, Fisher Library F03 | The University of Sydney | NSW | 2006
T +61 2 9351 5946 | M +61 405 647 868
E gary.bro...@sydney.edu.au<mailto:gary.bro...@sydney.edu.au>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net<mailto:DSpace-tech@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette




------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to