Unable to Solr-import-statistics

32 views
Skip to first unread message

Snickers

unread,
Mar 5, 2023, 7:23:12 PM3/5/23
to DSpace Technical Support
Hi All,

We are having an issue with importing solr statistics exported from Dspace 5.8. Below is the error:

./dspace solr-import-statistics -i statistics
Exception: Error from server at http://localhost:8983/solr/statistics: ERROR: [doc=e4666a98-549c-49ab-befe-f87b51ff6dc3] unknown field 'author_value'
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/statistics: ERROR: [doc=e4666a98-549c-49ab-befe-f87b51ff6dc3] unknown field 'author_value'
        at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:681)
        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.SolrClient.request(SolrClient.java:1290)


I tried editing schema.xml to include the author_value as a 'field' but it didn't work either. Any suggestion is appreciated.

Regards,
Bryan
        at org.dspace.util.SolrImportExport.importIndex(SolrImportExport.java:465)
        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)

Snickers

unread,
Mar 5, 2023, 9:13:08 PM3/5/23
to DSpace Technical Support
Solved it. There were multiple '/configsets/statistics/schema.xml' on the server. I found the correct one and added the author_value 'field' in schema.xml. Below is the instruction

To resolve this issue, you will need to modify the Solr schema configuration to define the 'author_value' field. You can do this by adding a new field definition to the schema.xml file in the Solr configuration directory.

Here are the steps you can follow to modify the Solr schema:

  1. Open the schema.xml file in a text editor.

  2. Locate the <fields> section in the schema.xml file.

  3. Add a new field definition for 'author_value'. For example, the following XML code can be added:

    <field name="author_value" type="text_general" indexed="true" stored="true"/>
  4. Save the schema.xml file.

  5. Restart Solr to apply the changes.

Reply all
Reply to author
Forward
0 new messages