Difference between revisions of "SUNScholar/SOLR Statistics"

From Libopedia
Jump to navigation Jump to search
m
 
(51 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<center>
 
<center>
  '''[[SUNScholar/Customisation|Back to Customisation]]'''
+
  '''[[SUNScholar/Statistics|Back to Statistics]]'''
 
</center>
 
</center>
  
==PLEASE NOTE:==
 
New statistics fields were introduced in DSpace 3.X, therefore any upgrade from a DSpace version less than 3.X will not have these fields. This causes major errors when attempting to do statistics maintenance in DSpace versions => 3.X, after an upgrade. See the link below for a possible fix.
 
https://gist.github.com/terrywbrady/82bd91b53ea4374b96e4
 
Because of this problem, we have moved to using Elastic Statistics instead, which seems to be more stable.
 
 
==Introduction==
 
==Introduction==
SOLR Statistics was introduced with DSpace version 1.6.2, but did not work well until DSpace version 1.8.2.
+
SOLR Statistics was introduced with DSpace =>1.6.2. SOLR statistics are now enabled by default for the XMLUI in DSpace versions =>3.2.
 +
==Instructions==
 +
===[[SUNScholar/Statistics/5.X|For DSpace 5.X]]===
 +
===[[SUNScholar/Statistics/4.X|For DSpace 4.X]]===
 +
 
 +
==[[SUNScholar/Statistics/Old Versions|Old Statistics Conversion Help]]==
 +
 
 +
==<font color="red">'''PLEASE NOTE:'''</font>==
 +
===Step 1 - Optimise statistics database===
 +
''Before upgrading DSpace, run SOLR statistics optimisation '''$HOME/bin/dspace stats-util -o''' at least once just before the upgrade!''
 +
===Step 2 - Backup statistics database===
 +
<font color="red">'''If you are upgrading, you need to backup the SOLR database before doing any new configuration.'''</font>
  
;<font color="red">SOLR statistics are enabled by default for the XMLUI in DSpace versions => 3.2.</font>
+
Type the following to backup the SOLR DB: (If using Ubuntu 12.04 LTS, replace tomcat7 with tomcat6)
 +
sudo service tomcat7 stop
  
==Requirements==
+
mkdir backup
<font color="red">'''Before attempting setup please make sure the following are correct:'''</font>
 
#[[SUNScholar/Prepare_Ubuntu/S05#Step_5.2.1:_Setup_.22authbind.22_for_Tomcat|Tomcat is listening on TCP port 80.]]
 
#[[SUNScholar/Install_DSpace/S08|The SOLR webapp is correctly published.]]
 
  
==[[SUNScholar/Statistics/4.X|For DSpace 4.X]]==
+
cp -Rv $HOME/solr/ $HOME/backup/
  
==[[SUNScholar/Statistics/3.X|For DSpace 3.X]]==
+
sudo service tomcat7 start
 +
===Step 3 - Adding new SOLR statistics database fields===
 +
New statistics fields were introduced in DSpace 4.X, therefore any upgrade from a DSpace version <= 3.X will not have these fields.
  
==[[SUNScholar/Statistics/1.8.X|For DSpace 1.8.X]]==
+
''The lack of these new fields in statistics records from previous versions of DSpace, [https://jira.duraspace.org/browse/DS-2212 causes major errors when attempting to do statistics maintenance] in DSpace versions => 4.X after an upgrade from a lower version of DSpace.'' See the link below for a possible fix.
 +
https://gist.github.com/terrywbrady/82bd91b53ea4374b96e4
 +
Because of this problem, we are considering using [[SUNScholar/Elastic_Statistics|Elastic Statistics]] exclusively instead, which seems to be more stable and provides download data not just visits and views.
  
==[[SUNScholar/Statistics/Old Versions|Old Statistics Conversion Help]]==
+
The issue is being discussed on this wiki page: https://wiki.duraspace.org/display/DSPACE/DSpace+statistics+-+current+status+and+future+development
  
==Standards==
+
Also see the following about work to automatically fix old statistics databases.
*http://www.projectcounter.org
+
*https://jira.duraspace.org/browse/DS-2486
 +
*https://jira.duraspace.org/browse/DS-2541
 +
*https://github.com/DSpace/DSpace/pull/905
  
{{SOLR-HELP}}
+
==References==
 +
*https://wiki.duraspace.org/display/DSDOC5x/SOLR+Statistics
 +
*https://wiki.duraspace.org/display/DSDOC5x/SOLR+Statistics+Maintenance
 +
----
 +
*https://wiki.duraspace.org/display/DSDOC4x/DSpace+Statistics
 +
*https://wiki.duraspace.org/display/DSDOC4x/Managing+Usage+Statistics
 +
----
 +
*https://wiki.duraspace.org/display/DSDOC3x/DSpace+Statistics
 +
*https://wiki.duraspace.org/display/DSDOC3x/Managing+Usage+Statistics
 +
[[Category:Customisation]]

Latest revision as of 16:48, 25 November 2016

Back to Statistics

Introduction

SOLR Statistics was introduced with DSpace =>1.6.2. SOLR statistics are now enabled by default for the XMLUI in DSpace versions =>3.2.

Instructions

For DSpace 5.X

For DSpace 4.X

Old Statistics Conversion Help

PLEASE NOTE:

Step 1 - Optimise statistics database

Before upgrading DSpace, run SOLR statistics optimisation $HOME/bin/dspace stats-util -o at least once just before the upgrade!

Step 2 - Backup statistics database

If you are upgrading, you need to backup the SOLR database before doing any new configuration.

Type the following to backup the SOLR DB: (If using Ubuntu 12.04 LTS, replace tomcat7 with tomcat6)

sudo service tomcat7 stop
mkdir backup
cp -Rv $HOME/solr/ $HOME/backup/
sudo service tomcat7 start

Step 3 - Adding new SOLR statistics database fields

New statistics fields were introduced in DSpace 4.X, therefore any upgrade from a DSpace version <= 3.X will not have these fields.

The lack of these new fields in statistics records from previous versions of DSpace, causes major errors when attempting to do statistics maintenance in DSpace versions => 4.X after an upgrade from a lower version of DSpace. See the link below for a possible fix.

https://gist.github.com/terrywbrady/82bd91b53ea4374b96e4

Because of this problem, we are considering using Elastic Statistics exclusively instead, which seems to be more stable and provides download data not just visits and views.

The issue is being discussed on this wiki page: https://wiki.duraspace.org/display/DSPACE/DSpace+statistics+-+current+status+and+future+development

Also see the following about work to automatically fix old statistics databases.

References