mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2025-01-27 05:49:12 +01:00
Update notes for 2020-02-06
This commit is contained in:
@ -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:
|
||||
|
||||
```
|
||||
<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>
|
||||
```
|
||||
|
||||
- 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
|
||||
|
||||
<!-- vim: set sw=2 ts=2: -->
|
||||
|
Reference in New Issue
Block a user