Hi Anthony,

oh right sorry, I should have looked at the help for -r: "While indexing the bundle names remove the statistics about deleted bitstreams". So yes, it looks like an upgrade is your best bet.

Alternatively, you could write a curation task / script that goes through all bitstream IDs in your statistics solr core and for each one, checks whether it's still a valid bitstream. If not, delete all hits for this bitstream by sending the appropriate solr query. Sorry, I don't have time right now to dig up examples for these queries, but if you're interested in going down that route and need help with the queries, post to the mailing list again and I'm sure someone will respond.

cheers,
Andrea

On 24/07/15 03:41, Anthony Petryk wrote:

Hi again Andrea,

 

As you predicted, I now get a “version conflict” error after applying your uid fix and rebuilding:

 

Exception: version conflict for " expected=1507325787224670208 actual=1507501635509682176

org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: version conflict for " expected=1507325787224670208 actual=1507501635509682176

 

So it looks like we’ll need to upgrade to 5 for the full solution.

 

Cheers,

 

Anthony

 

From: Anthony Petryk [mailto:anthony.pet...@uottawa.ca]
Sent: Thursday, July 23, 2015 11:22 AM
To: Andrea Schweer <schw...@waikato.ac.nz>; dspace-tech@lists.sourceforge.net
Subject: Re: [Dspace-tech] stats-util error "Document is missing mandatory uniqueKey field: uid"

 

Thanks for the response, Andrea. 

 

Do I need to do anything after updating the solrconfig.xml file, as you suggested?

 

I tried running but stats-util with just the –r flag, but it doesn’t work.  I confirmed this by looking at StatisticsClient.java, which only uses r if b is present:

 

          else if(line.hasOption('b'))

        {

            SolrLogger.reindexBitstreamHits(line.hasOption('r'));

        }

 

Best,

 

Anthony

 

From: Andrea Schweer [mailto:schw...@waikato.ac.nz]
Sent: Wednesday, July 22, 2015 5:32 PM
To: Anthony Petryk <anthony.pet...@uottawa.ca>; dspace-tech@lists.sourceforge.net
Subject: Re: [Dspace-tech] stats-util error "Document is missing mandatory uniqueKey field: uid"

 

Hi Anthony,

On 23/07/15 01:37, Anthony Petryk wrote:

DSpace 4.3.   We’re getting an error when trying to run dspace stats-util –br: “Document is missing mandatory uniqueKey field: uid”.  We want to run this command specifically to remove stats for deleted bitstreams (-r option).

 

This sounds like the same root problem as DS-2212, which is fixed in version 5.2.  But I just wanted to check: is there any way to get this to work without upgrading?


You're actually running into https://jira.duraspace.org/browse/DS-2489. If I remember correctly then you may be able to fix this by applying this small change to the solrconfig.xml for the statistics core: https://github.com/DSpace/DSpace/commit/b07707874a489b4d5238c87d04d2be1b28ece447

However, chances are that you'll then just run into further issues such as DS-2212.

If you're only after removing deleted bitstreams, try leaving out the "b" flag ("Reindex the bitstreams to ensure we have the bundle name"). Re-indexing will hit the uid bug (and probably the _version_ one too); deleting (-r only) shouldn't have the same issue since it won't try adding documents to the solr index.

cheers,
Andrea

-- 
Dr Andrea Schweer
IRR Technical Specialist, ITS Information Systems
The University of Waikato, Hamilton, New Zealand

-- 
Dr Andrea Schweer
IRR Technical Specialist, ITS Information Systems
The University of Waikato, Hamilton, New Zealand
+64-7-837 9120


------------------------------------------------------------------------------
_______________________________________________
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