Hi Tomas,

I recently had this issue and I believe that I have found a solution, which
I will document in the next few days. The long and the short of it is that
DSpace 7 does not support solr shards. You have to create one large solr shard
(statistics) from the multiple shards. The biggest problem I found doing
this was that DSpace was only ingesting the current year statistics only.
The solution was to rename the *csv files that are dumped by solr-export-
statistics. For example: the csv files for the solr core "statistics-2012"
will look something like this -- statistics-2012_export_2013-12_5.csv. You
have to rename all the csv files to remove the -2012 in the filename to
look like this: statistics_export_2013-12_5.csv. I downloaded the zipped up
cores in csv form to my windows machine so I could use a bulk rename tool
to remove the year suffix in each core. I then uploaded them to my linux
box running DSpace and ingested each one using the solr-import-statistics tool.
This is a very time consuming task.

Hope this helps and I will try to document this in the next few days.

Best regards,

James Holobetz

On Fri, Mar 24, 2023 at 3:37 PM Tomas Hajek <ha...@oakland.edu> wrote:

> Hello,
>    I am working on migrating a DSpace 5.10 installation to a new server
> running DSpace 7.5.  I have the basic installation running on RHEL 8.7 with
> Tomcat 9.0.71, Solr 8.11.2, node.js 16.18.1, and pm2 5.2.2.
> I was able to import the database and assetstore and I set up the Solr
> cores (authority,oai,search,statistics) from the installation instructions.
>    The Solr statistics from the 5.10 installation are sharded by year and
> I exported with the following:
>
> bin/dspace solr-export-statistics -i statistics-2015
> bin/dspace solr-export-statistics -i statistics-2016
> ...
> bin/dspace solr-export-statistics -i statistics-2022
>
> I have copied the exported files to the new 7.5 server
> into /opt/dspace/solr-export and am trying to import them but I get the
> following error (example when trying to import the 2015 statistics):
>
> /opt/dspace/bin/dspace solr-import-statistics -i statistics-2015
> Exception: Error from server at http://localhost:8983/solr/statistics-2015:
> Expected mime type application/octet-stream but got text/html. <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
> <title>Error 404 Not Found</title>
> </head>
> <body><h2>HTTP ERROR 404 Not Found</h2>
> <table>
> <tr><th>URI:</th><td>/solr/statistics-2015/admin/luke</td></tr>
> <tr><th>STATUS:</th><td>404</td></tr>
> <tr><th>MESSAGE:</th><td>Not Found</td></tr>
> <tr><th>SERVLET:</th><td>default</td></tr>
> </table>
>
> </body>
> </html>
>
> org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:
> Error from server at http://localhost:8983/solr/statistics-2015: Expected
> mime type application/octet-stream but got text/html. <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
> <title>Error 404 Not Found</title>
> </head>
> <body><h2>HTTP ERROR 404 Not Found</h2>
> <table>
> <tr><th>URI:</th><td>/solr/statistics-2015/admin/luke</td></tr>
> <tr><th>STATUS:</th><td>404</td></tr>
> <tr><th>MESSAGE:</th><td>Not Found</td></tr>
> <tr><th>SERVLET:</th><td>default</td></tr>
> </table>
>
> </body>
> </html>
>
> at
> org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:635)
> at
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:266)
> at
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:248)
> at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:214)
> at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:231)
> at
> org.dspace.util.SolrImportExport.getMultiValuedFields(SolrImportExport.java:482)
> at org.dspace.util.SolrImportExport.importIndex(SolrImportExport.java:433)
> at org.dspace.util.SolrImportExport.main(SolrImportExport.java:148)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> at
> org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:277)
> at
> org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:133)
> at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:98)
>
> Presumably this is due to not having the sharded statistics-20## cores in
> Solr configured but I'm not sure at this point how to add and configure
> them so I can import the statistics.  I am not very familiar with Solr.
>
> Can anyone enlighten me on how I might do this or correct my steps or let
> me know what else to look at.
>
> Any assistance would be greatly appreciated.
> Thank you,
>  -Tomas
>
> --
> All messages to this mailing list should adhere to the Code of Conduct:
> https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
> ---
> You received this message because you are subscribed to the Google Groups
> "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dspace-tech+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dspace-tech/CAPx-GQoBmwVH6byhm%2BZv4kg%3D5zmEH%3DQStGL-y1TTD%3D8qBQFo1w%40mail.gmail.com
> <https://groups.google.com/d/msgid/dspace-tech/CAPx-GQoBmwVH6byhm%2BZv4kg%3D5zmEH%3DQStGL-y1TTD%3D8qBQFo1w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/CAAosP7X%2B4wM1aLVqex6acXJm5rZgZ9Sbeu9yB-MD%2BDKXhgVOAg%40mail.gmail.com.

Reply via email to