Class SolrUpgradePre6xStatistics

java.lang.Object
org.dspace.util.SolrUpgradePre6xStatistics

public class SolrUpgradePre6xStatistics extends Object
CLI tool to upgrade legacy id references in SOLR statistics to DSpace 6 UUID's. This command will need to be run iteratively over each statistics shard until all legacy id values have been replaced. If a legacy id cannot be resolved from the database, the id will remain unchanged. "field:* AND NOT(field:*-*)" can be used to locate legacy ids See DS-3602 for the origin of this issue. This code is targeted for inclusion in the DSpace 6.1 release. Recommendation: for a large repository, run this command with -Xmx2000m if possible. To process 1,000,000 statistics records, it took 60 min to complete.
Author:
Terry Brady, Georgetown University Library
  • Field Details

  • Constructor Details

    • SolrUpgradePre6xStatistics

      public SolrUpgradePre6xStatistics(String indexName, int numRec, int batchSize) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Construct the utility class from the command line options
      Parameters:
      indexName - name of the statistics shard to update
      numRec - maximum number of records to process
      batchSize - batch this many documents before updating.
      Throws:
      IOException
      org.apache.solr.client.solrj.SolrServerException
  • Method Details

    • main

      public static void main(String[] args) throws org.apache.commons.cli.ParseException
      Entry point for command-line invocation
      Parameters:
      args - command-line arguments; see help for description
      Throws:
      org.apache.commons.cli.ParseException - if the command-line arguments cannot be parsed