Have a look at the differences between q and fq queries in solr. Monika suggest
using the addition of fq and this can boost performance as it uses solr caches
with no scoring and the q query uses a complex scoring mechanism to determine
the relevance of a result so ordering of the result set may be different. The
performance gains may be significant with fq and a combination of both of these
can give the best performance and ordering that is required.
Alastair
From: Gary Browne [mailto:gary.bro...@sydney.edu.au]
Sent: 03 July 2015 00:06
To: Duncan, Alastair (STFC,RAL,SC); dspace-tech@lists.sourceforge.net
Subject: RE: Solr stats queries - limiting by date
Thanks a lot Alastair,
I'll try that.
Cheers,
Gary
________________________________
From: alastair.dun...@stfc.ac.uk<mailto:alastair.dun...@stfc.ac.uk>
[alastair.dun...@stfc.ac.uk]
Sent: Thursday, 2 July 2015 6:32 PM
To: Gary Browne;
dspace-tech@lists.sourceforge.net<mailto:dspace-tech@lists.sourceforge.net>
Subject: RE: Solr stats queries - limiting by date
Hi Gary,
I'm not familiar with solr within DSpace but I've done some implementations
with solr so the type of query you are looking to do will be something like
this:
time:[NOW-6MONTH/MONTH TO NOW] AND bundleName:ORIGINAL
If you look at the schema fields the only one which is a date field is time so
I'm guessing that this is the timestamp of the stats event and this gives me
results that look about right.
http://localhost/solr/statistics/select?q=time%3A%5BNOW-6MONTH%2FMONTH+TO+NOW%5D+AND+bundleName%3AORIGINAL
I've no idea what field bundleName stores ;-)
Alastair
From: Gary Browne [mailto:gary.bro...@sydney.edu.au]
Sent: 02 July 2015 07:11
To: dspace-tech@lists.sourceforge.net<mailto:dspace-tech@lists.sourceforge.net>
Subject: [Dspace-tech] Solr stats queries - limiting by date
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
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette