mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2024-11-26 00:18:21 +01:00
Add notes for 2020-12-15
This commit is contained in:
parent
403fa49d46
commit
09897042a3
@ -351,4 +351,46 @@ $ curl -s -X POST http://localhost:9200/openrxv-items-temp/_clone/openrxv-items-
|
|||||||
$ curl -X PUT "localhost:9200/openrxv-items-temp/_settings?pretty" -H 'Content-Type: application/json' -d'{"settings": {"index.blocks.write": false}}'
|
$ curl -X PUT "localhost:9200/openrxv-items-temp/_settings?pretty" -H 'Content-Type: application/json' -d'{"settings": {"index.blocks.write": false}}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 2020-12-15
|
||||||
|
|
||||||
|
- After the re-harvest last night there were 200,000 items in the `openrxv-items-temp` index again
|
||||||
|
- I cleared the core and started a re-harvest, but Peter sent me a bunch of author corrections for CGSpace so I decided to cancel it until after I apply them and re-index Discovery
|
||||||
|
- I checked the 1,534 fixes in Open Refine (had to fix a few UTF-8 errors, as always from Peter's CSVs) and then applied them using the `fix-metadata-values.py` script:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ ./fix-metadata-values.py -i /tmp/2020-10-28-fix-1534-Authors.csv -db dspace -u dspace -p 'fuuu' -f dc.contributor.author -t 'correct' -m 3
|
||||||
|
$ ./delete-metadata-values.py -i /tmp/2020-10-28-delete-2-Authors.csv -db dspace -u dspace -p 'fuuu' -f dc.contributor.author -m 3
|
||||||
|
```
|
||||||
|
|
||||||
|
- Since I was re-indexing Discovery anyways I decided to check for any uppercase AGROVOC and lowercase them:
|
||||||
|
|
||||||
|
```console
|
||||||
|
dspace=# BEGIN;
|
||||||
|
BEGIN
|
||||||
|
dspace=# UPDATE metadatavalue SET text_value=LOWER(text_value) WHERE dspace_object_id IN (SELECT uuid FROM item) AND metadata_field_id=57 AND text_value ~ '[[:upper:]]';
|
||||||
|
UPDATE 406
|
||||||
|
dspace=# COMMIT;
|
||||||
|
COMMIT
|
||||||
|
```
|
||||||
|
|
||||||
|
- I also updated the Font Awesome icon classes for version 5 syntax:
|
||||||
|
|
||||||
|
```console
|
||||||
|
dspace=# BEGIN;
|
||||||
|
dspace=# UPDATE metadatavalue SET text_value = REGEXP_REPLACE(text_value, 'fa fa-rss','fas fa-rss', 'g') WHERE text_value LIKE '%fa fa-rss%';
|
||||||
|
UPDATE 74
|
||||||
|
dspace=# UPDATE metadatavalue SET text_value = REGEXP_REPLACE(text_value, 'fa fa-at','fas fa-at', 'g') WHERE text_value LIKE '%fa fa-at%';
|
||||||
|
UPDATE 74
|
||||||
|
dspace=# COMMIT;
|
||||||
|
```
|
||||||
|
|
||||||
|
- Then I started a full Discovery re-index:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xmx512m"
|
||||||
|
$ time chrt -b 0 ionice -c2 -n7 nice -n19 dspace index-discovery -b
|
||||||
|
```
|
||||||
|
|
||||||
|
- Udana sent a report that the WLE approver is experiencing the same issue Peter highlighted a few weeks ago: they are unable to save metadata edits in the workflow
|
||||||
|
|
||||||
<!-- vim: set sw=2 ts=2: -->
|
<!-- vim: set sw=2 ts=2: -->
|
||||||
|
Loading…
Reference in New Issue
Block a user