CGSpace Notes

Documenting day-to-day work on the CGSpace repository.

January, 2021

2021-01-03

  • Peter notified me that some filters on AReS were broken again
    • It’s the same issue with the field names getting .keyword appended to the end that I already filed an issue on OpenRXV about last month
    • I fixed the broken filters (careful to not edit any others, lest they break too!)
  • Fix an issue with start page number for the DSpace REST API and statistics API in OpenRXV
    • The start page had been “1” in the UI, but in the backend they were doing some gymnastics to adjust to the zero-based offset/limit/page of the DSpace REST API and the statistics API
    • I adjusted it to default to 0 and added a note to the admin screen
    • I realized that this issue was actually causing the first page of 100 statistics to be missing…
    • For example, this item has 51 views on CGSpace, but 0 on AReS
  • Start a re-index on AReS
    • First delete the old Elasticsearch temp index:
$ curl -XDELETE 'http://localhost:9200/openrxv-items-temp'
# start indexing in AReS
  • Then, the next morning when it’s done, check the results of the harvesting, backup the current openrxv-items index, and clone the openrxv-items-temp index to openrxv-items:
$ curl -s 'http://localhost:9200/openrxv-items-temp/_count?q=*&pretty'
{
  "count" : 100278,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  }
}
$ curl -X PUT "localhost:9200/openrxv-items/_settings" -H 'Content-Type: application/json' -d'{"settings": {"index.blocks.write": true}}'
$ curl -s -X POST http://localhost:9200/openrxv-items/_clone/openrxv-items-2021-01-04
$ curl -XDELETE 'http://localhost:9200/openrxv-items'
$ curl -X PUT "localhost:9200/openrxv-items-temp/_settings" -H 'Content-Type: application/json' -d'{"settings": {"index.blocks.write": true}}'
$ curl -s -X POST http://localhost:9200/openrxv-items-temp/_clone/openrxv-items
$ curl -XDELETE 'http://localhost:9200/openrxv-items-temp'
$ curl -XDELETE 'http://localhost:9200/openrxv-items-2021-01-04'

2021-01-04

  • There is one item that appears twice in AReS: 10568/66839
  • Help Peter troubleshoot an issue with Altmetric badges on AReS
    • He generated a report of our repository from Altmetric and noticed that many were missing scores despite having scores on CGSpace item pages
    • AReS harvest Altmetric scores using the Handle prefix (10568) in batch, while CGSpace uses the DOI if it is found, and falls back to using the Handle
    • I think it’s due to the fact that some items were never tweeted, so Altmetric never made the link between the DOI and the Handle
    • I did some tweets of five items and within an hour or so the DOI API link registers the associated Handle, and within an hour or so the Handle API link is live with the same score