diff --git a/content/posts/2020-02.md b/content/posts/2020-02.md index 273d1547a..29091e022 100644 --- a/content/posts/2020-02.md +++ b/content/posts/2020-02.md @@ -269,10 +269,38 @@ $ ls -lh /tmp/statistics-2019-01.json - Then I tested importing this by creating a new core in my development environment: ``` -$ curl 'http://localhost:8080/solr/admin/cores?action=CREATE&name=statistics-2019&instanceDir=/home/aorth/dspace63/solr/statistics&dataDir=/home/aorth/dspace63/solr/statistics-2019/data' +$ curl 'http://localhost:8080/solr/admin/cores?action=CREATE&name=statistics-2019&instanceDir=/home/aorth/dspace/solr/statistics&dataDir=/home/aorth/dspace/solr/statistics-2019/data' $ ./run.sh -s http://localhost:8080/solr/statistics-2019 -a import -o ~/Downloads/statistics-2019-01.json -k uid ``` - This imports the records into the core, but DSpace can't see them, and when I restart Tomcat the core is not seen by Solr... +- I got the core to load by adding it to `dspace/solr/solr.xml` manually, ie: + +``` + + ... + + + + + ... + +``` + +- But I don't like having to do that... why doesn't it load automatically? +- I sent a mail to the dspace-tech mailing list to ask about it +- Just for fun I tried to load these stats into a Solr 7.7.2 instance using the DSpace 7 solr config: +- First, create a Solr statistics core using the DSpace 7 config: +``` +$ ./bin/solr create_core -c statistics -d ~/src/git/DSpace/dspace/solr/statistics/conf -p 8983 +``` + +- Then try to import the stats, skipping a shitload of fields that are apparently added to our Solr statistics by Atmire modules: + +``` +$ ./run.sh -s http://localhost:8983/solr/statistics -a import -o ~/Downloads/statistics-2019-01.json -k uid -S author_mtdt,author_mtdt_search,iso_mtdt_search,iso_mtdt,subject_mtdt,subject_mtdt_search,containerCollection,containerCommunity,containerItem,countryCode_ngram,countryCode_search,cua_version,dateYear,dateYearMonth,geoipcountrycode,ip_ngram,ip_search,isArchived,isInternal,isWithdrawn,containerBitstream,file_id,referrer_ngram,referrer_search,userAgent_ngram,userAgent_search,version_id,complete_query,complete_query_search,filterquery,ngram_query_search,ngram_simplequery_search,simple_query,simple_query_search,range,rangeDescription,rangeDescription_ngram,rangeDescription_search,range_ngram,range_search,actingGroupId,actorMemberGroupId,bitstreamCount,solr_update_time_stamp,bitstreamId +``` + +- OK that imported! I wonder if it works... maybe I'll try another day diff --git a/docs/2020-02/index.html b/docs/2020-02/index.html index 3e4cecffe..daaa6ce1c 100644 --- a/docs/2020-02/index.html +++ b/docs/2020-02/index.html @@ -20,7 +20,7 @@ The code finally builds and runs with a fresh install - + @@ -45,9 +45,9 @@ The code finally builds and runs with a fresh install "@type": "BlogPosting", "headline": "February, 2020", "url": "https:\/\/alanorth.github.io\/cgspace-notes\/2020-02\/", - "wordCount": "1926", + "wordCount": "2069", "datePublished": "2020-02-02T11:56:30+02:00", - "dateModified": "2020-02-06T10:01:17+02:00", + "dateModified": "2020-02-06T12:47:25+02:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -392,10 +392,33 @@ $ ls -lh /tmp/statistics-2019-01.json -
$ curl 'http://localhost:8080/solr/admin/cores?action=CREATE&name=statistics-2019&instanceDir=/home/aorth/dspace63/solr/statistics&dataDir=/home/aorth/dspace63/solr/statistics-2019/data'
+
$ curl 'http://localhost:8080/solr/admin/cores?action=CREATE&name=statistics-2019&instanceDir=/home/aorth/dspace/solr/statistics&dataDir=/home/aorth/dspace/solr/statistics-2019/data'
 $ ./run.sh -s http://localhost:8080/solr/statistics-2019 -a import -o ~/Downloads/statistics-2019-01.json -k uid
 
+
  <cores adminPath="/admin/cores">
+  ...
+    <core name="statistics" instanceDir="statistics" />
+    <core name="statistics-2019" instanceDir="statistics">
+        <property name="dataDir" value="/home/aorth/dspace/solr/statistics-2019/data" />
+    </core>
+  ...
+  </cores>
+
+
$ ./bin/solr create_core -c statistics -d ~/src/git/DSpace/dspace/solr/statistics/conf -p 8983
+
+
$ ./run.sh -s http://localhost:8983/solr/statistics -a import -o ~/Downloads/statistics-2019-01.json -k uid -S author_mtdt,author_mtdt_search,iso_mtdt_search,iso_mtdt,subject_mtdt,subject_mtdt_search,containerCollection,containerCommunity,containerItem,countryCode_ngram,countryCode_search,cua_version,dateYear,dateYearMonth,geoipcountrycode,ip_ngram,ip_search,isArchived,isInternal,isWithdrawn,containerBitstream,file_id,referrer_ngram,referrer_search,userAgent_ngram,userAgent_search,version_id,complete_query,complete_query_search,filterquery,ngram_query_search,ngram_simplequery_search,simple_query,simple_query_search,range,rangeDescription,rangeDescription_ngram,rangeDescription_search,range_ngram,range_search,actingGroupId,actorMemberGroupId,bitstreamCount,solr_update_time_stamp,bitstreamId
+
diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 289e122e7..f906acbd5 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,27 +4,27 @@ https://alanorth.github.io/cgspace-notes/categories/ - 2020-02-06T10:01:17+02:00 + 2020-02-06T12:47:25+02:00 https://alanorth.github.io/cgspace-notes/ - 2020-02-06T10:01:17+02:00 + 2020-02-06T12:47:25+02:00 https://alanorth.github.io/cgspace-notes/2020-02/ - 2020-02-06T10:01:17+02:00 + 2020-02-06T12:47:25+02:00 https://alanorth.github.io/cgspace-notes/categories/notes/ - 2020-02-06T10:01:17+02:00 + 2020-02-06T12:47:25+02:00 https://alanorth.github.io/cgspace-notes/posts/ - 2020-02-06T10:01:17+02:00 + 2020-02-06T12:47:25+02:00