Add notes for 2016-12-07

This commit is contained in:
Alan Orth 2016-12-07 13:55:16 +02:00
parent f1cbf288d7
commit f4d50401bd
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
5 changed files with 680 additions and 1 deletions

View File

@ -227,3 +227,134 @@ UPDATE 561
- In other news, it seems the batch edit patch is working, there are no more WARN errors in the logs and the batch edit seems to work
- I need to check the CGSpace logs to see if there are still errors there, and then deploy/monitor it there
- Paola from CCAFS mentioned she also has the "take task" bug on CGSpace
- Reading about [`shared_buffers` in PostgreSQL configuration](https://www.postgresql.org/docs/9.5/static/runtime-config-resource.html) (default is 128MB)
- Looks like we have ~5GB of memory used by caches on the test server (after OS and JVM heap!), so we might as well bump up the buffers for Postgres
- The docs say a good starting point for a dedicated server is 25% of the system RAM, and our server isn't dedicated (also runs Solr, which can benefit from OS cache) so let's try 1024MB
- In other news, the authority reindexing keeps crashing (I was manually running it after the author updates above):
```
$ time JAVA_OPTS="-Xms768m -Xmx768m -Dfile.encoding=UTF-8" /home/dspacetest.cgiar.org/bin/dspace index-authority
Retrieving all data
Initialize org.dspace.authority.indexer.DSpaceAuthorityIndexer
Exception: null
java.lang.NullPointerException
at org.dspace.authority.AuthorityValueGenerator.generateRaw(AuthorityValueGenerator.java:82)
at org.dspace.authority.AuthorityValueGenerator.generate(AuthorityValueGenerator.java:39)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.prepareNextValue(DSpaceAuthorityIndexer.java:201)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:132)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:159)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.AuthorityIndexClient.main(AuthorityIndexClient.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
real 8m39.913s
user 1m54.190s
sys 0m22.647s
```
## 2016-12-07
- For what it's worth, after running the same SQL updates on my local test server, `index-authority` runs and completes just fine
- I will have to test more
- Anyways, I noticed that some of the authority values I set actually have versions of author names we don't want, ie "Grace, D."
- For example, do a Solr query for "first_name:Grace" and look at the results
- Querying that ID shows the fields that need to be changed:
```
{
"responseHeader": {
"status": 0,
"QTime": 1,
"params": {
"q": "id:0b4fcbc1-d930-4319-9b4d-ea1553cca70b",
"indent": "true",
"wt": "json",
"_": "1481102189244"
}
},
"response": {
"numFound": 1,
"start": 0,
"docs": [
{
"id": "0b4fcbc1-d930-4319-9b4d-ea1553cca70b",
"field": "dc_contributor_author",
"value": "Grace, D.",
"deleted": false,
"creation_date": "2016-11-10T15:13:40.318Z",
"last_modified_date": "2016-11-10T15:13:40.318Z",
"authority_type": "person",
"first_name": "D.",
"last_name": "Grace"
}
]
}
}
```
- I think I can just update the `value`, `first_name`, and `last_name` fields...
- The update syntax should be something like this, but I'm getting errors from Solr:
```
$ curl 'localhost:8081/solr/authority/update?commit=true&wt=json&indent=true' -H 'Content-type:application/json' -d '[{"id":"1","price":{"set":100}}]'
{
"responseHeader":{
"status":400,
"QTime":0},
"error":{
"msg":"Unexpected character '[' (code 91) in prolog; expected '<'\n at [row,col {unknown-source}]: [1,1]",
"code":400}}
```
- When I try using the XML format I get an error that the `updateLog` needs to be configured for that core
- Maybe I can just remove the authority UUID from the records, run the indexing again so it creates a new one for each name variant, then match them correctly?
```
dspace=# update metadatavalue set authority=null, confidence=-1 where resource_type_id=2 and metadata_field_id=3 and text_value like 'Grace, D%';
UPDATE 561
```
- Then I'll reindex discovery and authority and see how the authority Solr core looks
- After this, now there are authorities for some of the "Grace, D." and "Grace, Delia" text_values in the database (the first version is actually the same authority that already exists in the core, so it was just added back to some text_values, but the second one is new):
```
$ curl 'localhost:8081/solr/authority/select?q=id%3A18ea1525-2513-430a-8817-a834cd733fbc&wt=json&indent=true'
{
"responseHeader":{
"status":0,
"QTime":0,
"params":{
"q":"id:18ea1525-2513-430a-8817-a834cd733fbc",
"indent":"true",
"wt":"json"}},
"response":{"numFound":1,"start":0,"docs":[
{
"id":"18ea1525-2513-430a-8817-a834cd733fbc",
"field":"dc_contributor_author",
"value":"Grace, Delia",
"deleted":false,
"creation_date":"2016-12-07T10:54:34.356Z",
"last_modified_date":"2016-12-07T10:54:34.356Z",
"authority_type":"person",
"first_name":"Delia",
"last_name":"Grace"}]
}}
```
- So now I could set them all to this ID and the name would be ok, but there has to be a better way!
- In this case it seems that since there were also two different IDs in the original database, I just picked the wrong one!
- Better to use:
```
dspace#= update metadatavalue set text_value='Grace, Delia', authority='bfa61d7c-7583-4175-991c-2e7315000f0c', confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like 'Grace, D%';
```
- This proves that unifying author name varieties in authorities is easy, but fixing the name in the authority is tricky!

View File

@ -30,7 +30,7 @@
<meta itemprop="dateModified" content="2016-12-02T10:43:00&#43;03:00" />
<meta itemprop="wordCount" content="1190">
<meta itemprop="wordCount" content="1754">
@ -350,6 +350,143 @@ UPDATE 561
<li>In other news, it seems the batch edit patch is working, there are no more WARN errors in the logs and the batch edit seems to work</li>
<li>I need to check the CGSpace logs to see if there are still errors there, and then deploy/monitor it there</li>
<li>Paola from CCAFS mentioned she also has the &ldquo;take task&rdquo; bug on CGSpace</li>
<li>Reading about <a href="https://www.postgresql.org/docs/9.5/static/runtime-config-resource.html"><code>shared_buffers</code> in PostgreSQL configuration</a> (default is 128MB)</li>
<li>Looks like we have ~5GB of memory used by caches on the test server (after OS and JVM heap!), so we might as well bump up the buffers for Postgres</li>
<li>The docs say a good starting point for a dedicated server is 25% of the system RAM, and our server isn&rsquo;t dedicated (also runs Solr, which can benefit from OS cache) so let&rsquo;s try 1024MB</li>
<li>In other news, the authority reindexing keeps crashing (I was manually running it after the author updates above):</li>
</ul>
<pre><code>$ time JAVA_OPTS=&quot;-Xms768m -Xmx768m -Dfile.encoding=UTF-8&quot; /home/dspacetest.cgiar.org/bin/dspace index-authority
Retrieving all data
Initialize org.dspace.authority.indexer.DSpaceAuthorityIndexer
Exception: null
java.lang.NullPointerException
at org.dspace.authority.AuthorityValueGenerator.generateRaw(AuthorityValueGenerator.java:82)
at org.dspace.authority.AuthorityValueGenerator.generate(AuthorityValueGenerator.java:39)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.prepareNextValue(DSpaceAuthorityIndexer.java:201)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:132)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:159)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.AuthorityIndexClient.main(AuthorityIndexClient.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
real 8m39.913s
user 1m54.190s
sys 0m22.647s
</code></pre>
<h2 id="2016-12-07">2016-12-07</h2>
<ul>
<li>For what it&rsquo;s worth, after running the same SQL updates on my local test server, <code>index-authority</code> runs and completes just fine</li>
<li>I will have to test more</li>
<li>Anyways, I noticed that some of the authority values I set actually have versions of author names we don&rsquo;t want, ie &ldquo;Grace, D.&rdquo;</li>
<li>For example, do a Solr query for &ldquo;first_name:Grace&rdquo; and look at the results</li>
<li>Querying that ID shows the fields that need to be changed:</li>
</ul>
<pre><code>{
&quot;responseHeader&quot;: {
&quot;status&quot;: 0,
&quot;QTime&quot;: 1,
&quot;params&quot;: {
&quot;q&quot;: &quot;id:0b4fcbc1-d930-4319-9b4d-ea1553cca70b&quot;,
&quot;indent&quot;: &quot;true&quot;,
&quot;wt&quot;: &quot;json&quot;,
&quot;_&quot;: &quot;1481102189244&quot;
}
},
&quot;response&quot;: {
&quot;numFound&quot;: 1,
&quot;start&quot;: 0,
&quot;docs&quot;: [
{
&quot;id&quot;: &quot;0b4fcbc1-d930-4319-9b4d-ea1553cca70b&quot;,
&quot;field&quot;: &quot;dc_contributor_author&quot;,
&quot;value&quot;: &quot;Grace, D.&quot;,
&quot;deleted&quot;: false,
&quot;creation_date&quot;: &quot;2016-11-10T15:13:40.318Z&quot;,
&quot;last_modified_date&quot;: &quot;2016-11-10T15:13:40.318Z&quot;,
&quot;authority_type&quot;: &quot;person&quot;,
&quot;first_name&quot;: &quot;D.&quot;,
&quot;last_name&quot;: &quot;Grace&quot;
}
]
}
}
</code></pre>
<ul>
<li>I think I can just update the <code>value</code>, <code>first_name</code>, and <code>last_name</code> fields&hellip;</li>
<li>The update syntax should be something like this, but I&rsquo;m getting errors from Solr:</li>
</ul>
<pre><code>$ curl 'localhost:8081/solr/authority/update?commit=true&amp;wt=json&amp;indent=true' -H 'Content-type:application/json' -d '[{&quot;id&quot;:&quot;1&quot;,&quot;price&quot;:{&quot;set&quot;:100}}]'
{
&quot;responseHeader&quot;:{
&quot;status&quot;:400,
&quot;QTime&quot;:0},
&quot;error&quot;:{
&quot;msg&quot;:&quot;Unexpected character '[' (code 91) in prolog; expected '&lt;'\n at [row,col {unknown-source}]: [1,1]&quot;,
&quot;code&quot;:400}}
</code></pre>
<ul>
<li>When I try using the XML format I get an error that the <code>updateLog</code> needs to be configured for that core</li>
<li>Maybe I can just remove the authority UUID from the records, run the indexing again so it creates a new one for each name variant, then match them correctly?</li>
</ul>
<pre><code>dspace=# update metadatavalue set authority=null, confidence=-1 where resource_type_id=2 and metadata_field_id=3 and text_value like 'Grace, D%';
UPDATE 561
</code></pre>
<ul>
<li>Then I&rsquo;ll reindex discovery and authority and see how the authority Solr core looks</li>
<li>After this, now there are authorities for some of the &ldquo;Grace, D.&rdquo; and &ldquo;Grace, Delia&rdquo; text_values in the database (the first version is actually the same authority that already exists in the core, so it was just added back to some text_values, but the second one is new):</li>
</ul>
<pre><code>$ curl 'localhost:8081/solr/authority/select?q=id%3A18ea1525-2513-430a-8817-a834cd733fbc&amp;wt=json&amp;indent=true'
{
&quot;responseHeader&quot;:{
&quot;status&quot;:0,
&quot;QTime&quot;:0,
&quot;params&quot;:{
&quot;q&quot;:&quot;id:18ea1525-2513-430a-8817-a834cd733fbc&quot;,
&quot;indent&quot;:&quot;true&quot;,
&quot;wt&quot;:&quot;json&quot;}},
&quot;response&quot;:{&quot;numFound&quot;:1,&quot;start&quot;:0,&quot;docs&quot;:[
{
&quot;id&quot;:&quot;18ea1525-2513-430a-8817-a834cd733fbc&quot;,
&quot;field&quot;:&quot;dc_contributor_author&quot;,
&quot;value&quot;:&quot;Grace, Delia&quot;,
&quot;deleted&quot;:false,
&quot;creation_date&quot;:&quot;2016-12-07T10:54:34.356Z&quot;,
&quot;last_modified_date&quot;:&quot;2016-12-07T10:54:34.356Z&quot;,
&quot;authority_type&quot;:&quot;person&quot;,
&quot;first_name&quot;:&quot;Delia&quot;,
&quot;last_name&quot;:&quot;Grace&quot;}]
}}
</code></pre>
<ul>
<li>So now I could set them all to this ID and the name would be ok, but there has to be a better way!</li>
<li>In this case it seems that since there were also two different IDs in the original database, I just picked the wrong one!</li>
<li>Better to use:</li>
</ul>
<pre><code>dspace#= update metadatavalue set text_value='Grace, Delia', authority='bfa61d7c-7583-4175-991c-2e7315000f0c', confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like 'Grace, D%';
</code></pre>
<ul>
<li>This proves that unifying author name varieties in authorities is easy, but fixing the name in the authority is tricky!</li>
</ul>

View File

@ -254,6 +254,143 @@ UPDATE 561
&lt;li&gt;In other news, it seems the batch edit patch is working, there are no more WARN errors in the logs and the batch edit seems to work&lt;/li&gt;
&lt;li&gt;I need to check the CGSpace logs to see if there are still errors there, and then deploy/monitor it there&lt;/li&gt;
&lt;li&gt;Paola from CCAFS mentioned she also has the &amp;ldquo;take task&amp;rdquo; bug on CGSpace&lt;/li&gt;
&lt;li&gt;Reading about &lt;a href=&#34;https://www.postgresql.org/docs/9.5/static/runtime-config-resource.html&#34;&gt;&lt;code&gt;shared_buffers&lt;/code&gt; in PostgreSQL configuration&lt;/a&gt; (default is 128MB)&lt;/li&gt;
&lt;li&gt;Looks like we have ~5GB of memory used by caches on the test server (after OS and JVM heap!), so we might as well bump up the buffers for Postgres&lt;/li&gt;
&lt;li&gt;The docs say a good starting point for a dedicated server is 25% of the system RAM, and our server isn&amp;rsquo;t dedicated (also runs Solr, which can benefit from OS cache) so let&amp;rsquo;s try 1024MB&lt;/li&gt;
&lt;li&gt;In other news, the authority reindexing keeps crashing (I was manually running it after the author updates above):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ time JAVA_OPTS=&amp;quot;-Xms768m -Xmx768m -Dfile.encoding=UTF-8&amp;quot; /home/dspacetest.cgiar.org/bin/dspace index-authority
Retrieving all data
Initialize org.dspace.authority.indexer.DSpaceAuthorityIndexer
Exception: null
java.lang.NullPointerException
at org.dspace.authority.AuthorityValueGenerator.generateRaw(AuthorityValueGenerator.java:82)
at org.dspace.authority.AuthorityValueGenerator.generate(AuthorityValueGenerator.java:39)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.prepareNextValue(DSpaceAuthorityIndexer.java:201)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:132)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:159)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.AuthorityIndexClient.main(AuthorityIndexClient.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
real 8m39.913s
user 1m54.190s
sys 0m22.647s
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-12-07&#34;&gt;2016-12-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;For what it&amp;rsquo;s worth, after running the same SQL updates on my local test server, &lt;code&gt;index-authority&lt;/code&gt; runs and completes just fine&lt;/li&gt;
&lt;li&gt;I will have to test more&lt;/li&gt;
&lt;li&gt;Anyways, I noticed that some of the authority values I set actually have versions of author names we don&amp;rsquo;t want, ie &amp;ldquo;Grace, D.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;For example, do a Solr query for &amp;ldquo;first_name:Grace&amp;rdquo; and look at the results&lt;/li&gt;
&lt;li&gt;Querying that ID shows the fields that need to be changed:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;{
&amp;quot;responseHeader&amp;quot;: {
&amp;quot;status&amp;quot;: 0,
&amp;quot;QTime&amp;quot;: 1,
&amp;quot;params&amp;quot;: {
&amp;quot;q&amp;quot;: &amp;quot;id:0b4fcbc1-d930-4319-9b4d-ea1553cca70b&amp;quot;,
&amp;quot;indent&amp;quot;: &amp;quot;true&amp;quot;,
&amp;quot;wt&amp;quot;: &amp;quot;json&amp;quot;,
&amp;quot;_&amp;quot;: &amp;quot;1481102189244&amp;quot;
}
},
&amp;quot;response&amp;quot;: {
&amp;quot;numFound&amp;quot;: 1,
&amp;quot;start&amp;quot;: 0,
&amp;quot;docs&amp;quot;: [
{
&amp;quot;id&amp;quot;: &amp;quot;0b4fcbc1-d930-4319-9b4d-ea1553cca70b&amp;quot;,
&amp;quot;field&amp;quot;: &amp;quot;dc_contributor_author&amp;quot;,
&amp;quot;value&amp;quot;: &amp;quot;Grace, D.&amp;quot;,
&amp;quot;deleted&amp;quot;: false,
&amp;quot;creation_date&amp;quot;: &amp;quot;2016-11-10T15:13:40.318Z&amp;quot;,
&amp;quot;last_modified_date&amp;quot;: &amp;quot;2016-11-10T15:13:40.318Z&amp;quot;,
&amp;quot;authority_type&amp;quot;: &amp;quot;person&amp;quot;,
&amp;quot;first_name&amp;quot;: &amp;quot;D.&amp;quot;,
&amp;quot;last_name&amp;quot;: &amp;quot;Grace&amp;quot;
}
]
}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I think I can just update the &lt;code&gt;value&lt;/code&gt;, &lt;code&gt;first_name&lt;/code&gt;, and &lt;code&gt;last_name&lt;/code&gt; fields&amp;hellip;&lt;/li&gt;
&lt;li&gt;The update syntax should be something like this, but I&amp;rsquo;m getting errors from Solr:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl &#39;localhost:8081/solr/authority/update?commit=true&amp;amp;wt=json&amp;amp;indent=true&#39; -H &#39;Content-type:application/json&#39; -d &#39;[{&amp;quot;id&amp;quot;:&amp;quot;1&amp;quot;,&amp;quot;price&amp;quot;:{&amp;quot;set&amp;quot;:100}}]&#39;
{
&amp;quot;responseHeader&amp;quot;:{
&amp;quot;status&amp;quot;:400,
&amp;quot;QTime&amp;quot;:0},
&amp;quot;error&amp;quot;:{
&amp;quot;msg&amp;quot;:&amp;quot;Unexpected character &#39;[&#39; (code 91) in prolog; expected &#39;&amp;lt;&#39;\n at [row,col {unknown-source}]: [1,1]&amp;quot;,
&amp;quot;code&amp;quot;:400}}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;When I try using the XML format I get an error that the &lt;code&gt;updateLog&lt;/code&gt; needs to be configured for that core&lt;/li&gt;
&lt;li&gt;Maybe I can just remove the authority UUID from the records, run the indexing again so it creates a new one for each name variant, then match them correctly?&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set authority=null, confidence=-1 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Grace, D%&#39;;
UPDATE 561
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Then I&amp;rsquo;ll reindex discovery and authority and see how the authority Solr core looks&lt;/li&gt;
&lt;li&gt;After this, now there are authorities for some of the &amp;ldquo;Grace, D.&amp;rdquo; and &amp;ldquo;Grace, Delia&amp;rdquo; text_values in the database (the first version is actually the same authority that already exists in the core, so it was just added back to some text_values, but the second one is new):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl &#39;localhost:8081/solr/authority/select?q=id%3A18ea1525-2513-430a-8817-a834cd733fbc&amp;amp;wt=json&amp;amp;indent=true&#39;
{
&amp;quot;responseHeader&amp;quot;:{
&amp;quot;status&amp;quot;:0,
&amp;quot;QTime&amp;quot;:0,
&amp;quot;params&amp;quot;:{
&amp;quot;q&amp;quot;:&amp;quot;id:18ea1525-2513-430a-8817-a834cd733fbc&amp;quot;,
&amp;quot;indent&amp;quot;:&amp;quot;true&amp;quot;,
&amp;quot;wt&amp;quot;:&amp;quot;json&amp;quot;}},
&amp;quot;response&amp;quot;:{&amp;quot;numFound&amp;quot;:1,&amp;quot;start&amp;quot;:0,&amp;quot;docs&amp;quot;:[
{
&amp;quot;id&amp;quot;:&amp;quot;18ea1525-2513-430a-8817-a834cd733fbc&amp;quot;,
&amp;quot;field&amp;quot;:&amp;quot;dc_contributor_author&amp;quot;,
&amp;quot;value&amp;quot;:&amp;quot;Grace, Delia&amp;quot;,
&amp;quot;deleted&amp;quot;:false,
&amp;quot;creation_date&amp;quot;:&amp;quot;2016-12-07T10:54:34.356Z&amp;quot;,
&amp;quot;last_modified_date&amp;quot;:&amp;quot;2016-12-07T10:54:34.356Z&amp;quot;,
&amp;quot;authority_type&amp;quot;:&amp;quot;person&amp;quot;,
&amp;quot;first_name&amp;quot;:&amp;quot;Delia&amp;quot;,
&amp;quot;last_name&amp;quot;:&amp;quot;Grace&amp;quot;}]
}}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;So now I could set them all to this ID and the name would be ok, but there has to be a better way!&lt;/li&gt;
&lt;li&gt;In this case it seems that since there were also two different IDs in the original database, I just picked the wrong one!&lt;/li&gt;
&lt;li&gt;Better to use:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace#= update metadatavalue set text_value=&#39;Grace, Delia&#39;, authority=&#39;bfa61d7c-7583-4175-991c-2e7315000f0c&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Grace, D%&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;This proves that unifying author name varieties in authorities is easy, but fixing the name in the authority is tricky!&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>

View File

@ -254,6 +254,143 @@ UPDATE 561
&lt;li&gt;In other news, it seems the batch edit patch is working, there are no more WARN errors in the logs and the batch edit seems to work&lt;/li&gt;
&lt;li&gt;I need to check the CGSpace logs to see if there are still errors there, and then deploy/monitor it there&lt;/li&gt;
&lt;li&gt;Paola from CCAFS mentioned she also has the &amp;ldquo;take task&amp;rdquo; bug on CGSpace&lt;/li&gt;
&lt;li&gt;Reading about &lt;a href=&#34;https://www.postgresql.org/docs/9.5/static/runtime-config-resource.html&#34;&gt;&lt;code&gt;shared_buffers&lt;/code&gt; in PostgreSQL configuration&lt;/a&gt; (default is 128MB)&lt;/li&gt;
&lt;li&gt;Looks like we have ~5GB of memory used by caches on the test server (after OS and JVM heap!), so we might as well bump up the buffers for Postgres&lt;/li&gt;
&lt;li&gt;The docs say a good starting point for a dedicated server is 25% of the system RAM, and our server isn&amp;rsquo;t dedicated (also runs Solr, which can benefit from OS cache) so let&amp;rsquo;s try 1024MB&lt;/li&gt;
&lt;li&gt;In other news, the authority reindexing keeps crashing (I was manually running it after the author updates above):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ time JAVA_OPTS=&amp;quot;-Xms768m -Xmx768m -Dfile.encoding=UTF-8&amp;quot; /home/dspacetest.cgiar.org/bin/dspace index-authority
Retrieving all data
Initialize org.dspace.authority.indexer.DSpaceAuthorityIndexer
Exception: null
java.lang.NullPointerException
at org.dspace.authority.AuthorityValueGenerator.generateRaw(AuthorityValueGenerator.java:82)
at org.dspace.authority.AuthorityValueGenerator.generate(AuthorityValueGenerator.java:39)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.prepareNextValue(DSpaceAuthorityIndexer.java:201)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:132)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:159)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.AuthorityIndexClient.main(AuthorityIndexClient.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
real 8m39.913s
user 1m54.190s
sys 0m22.647s
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-12-07&#34;&gt;2016-12-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;For what it&amp;rsquo;s worth, after running the same SQL updates on my local test server, &lt;code&gt;index-authority&lt;/code&gt; runs and completes just fine&lt;/li&gt;
&lt;li&gt;I will have to test more&lt;/li&gt;
&lt;li&gt;Anyways, I noticed that some of the authority values I set actually have versions of author names we don&amp;rsquo;t want, ie &amp;ldquo;Grace, D.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;For example, do a Solr query for &amp;ldquo;first_name:Grace&amp;rdquo; and look at the results&lt;/li&gt;
&lt;li&gt;Querying that ID shows the fields that need to be changed:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;{
&amp;quot;responseHeader&amp;quot;: {
&amp;quot;status&amp;quot;: 0,
&amp;quot;QTime&amp;quot;: 1,
&amp;quot;params&amp;quot;: {
&amp;quot;q&amp;quot;: &amp;quot;id:0b4fcbc1-d930-4319-9b4d-ea1553cca70b&amp;quot;,
&amp;quot;indent&amp;quot;: &amp;quot;true&amp;quot;,
&amp;quot;wt&amp;quot;: &amp;quot;json&amp;quot;,
&amp;quot;_&amp;quot;: &amp;quot;1481102189244&amp;quot;
}
},
&amp;quot;response&amp;quot;: {
&amp;quot;numFound&amp;quot;: 1,
&amp;quot;start&amp;quot;: 0,
&amp;quot;docs&amp;quot;: [
{
&amp;quot;id&amp;quot;: &amp;quot;0b4fcbc1-d930-4319-9b4d-ea1553cca70b&amp;quot;,
&amp;quot;field&amp;quot;: &amp;quot;dc_contributor_author&amp;quot;,
&amp;quot;value&amp;quot;: &amp;quot;Grace, D.&amp;quot;,
&amp;quot;deleted&amp;quot;: false,
&amp;quot;creation_date&amp;quot;: &amp;quot;2016-11-10T15:13:40.318Z&amp;quot;,
&amp;quot;last_modified_date&amp;quot;: &amp;quot;2016-11-10T15:13:40.318Z&amp;quot;,
&amp;quot;authority_type&amp;quot;: &amp;quot;person&amp;quot;,
&amp;quot;first_name&amp;quot;: &amp;quot;D.&amp;quot;,
&amp;quot;last_name&amp;quot;: &amp;quot;Grace&amp;quot;
}
]
}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I think I can just update the &lt;code&gt;value&lt;/code&gt;, &lt;code&gt;first_name&lt;/code&gt;, and &lt;code&gt;last_name&lt;/code&gt; fields&amp;hellip;&lt;/li&gt;
&lt;li&gt;The update syntax should be something like this, but I&amp;rsquo;m getting errors from Solr:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl &#39;localhost:8081/solr/authority/update?commit=true&amp;amp;wt=json&amp;amp;indent=true&#39; -H &#39;Content-type:application/json&#39; -d &#39;[{&amp;quot;id&amp;quot;:&amp;quot;1&amp;quot;,&amp;quot;price&amp;quot;:{&amp;quot;set&amp;quot;:100}}]&#39;
{
&amp;quot;responseHeader&amp;quot;:{
&amp;quot;status&amp;quot;:400,
&amp;quot;QTime&amp;quot;:0},
&amp;quot;error&amp;quot;:{
&amp;quot;msg&amp;quot;:&amp;quot;Unexpected character &#39;[&#39; (code 91) in prolog; expected &#39;&amp;lt;&#39;\n at [row,col {unknown-source}]: [1,1]&amp;quot;,
&amp;quot;code&amp;quot;:400}}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;When I try using the XML format I get an error that the &lt;code&gt;updateLog&lt;/code&gt; needs to be configured for that core&lt;/li&gt;
&lt;li&gt;Maybe I can just remove the authority UUID from the records, run the indexing again so it creates a new one for each name variant, then match them correctly?&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set authority=null, confidence=-1 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Grace, D%&#39;;
UPDATE 561
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Then I&amp;rsquo;ll reindex discovery and authority and see how the authority Solr core looks&lt;/li&gt;
&lt;li&gt;After this, now there are authorities for some of the &amp;ldquo;Grace, D.&amp;rdquo; and &amp;ldquo;Grace, Delia&amp;rdquo; text_values in the database (the first version is actually the same authority that already exists in the core, so it was just added back to some text_values, but the second one is new):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl &#39;localhost:8081/solr/authority/select?q=id%3A18ea1525-2513-430a-8817-a834cd733fbc&amp;amp;wt=json&amp;amp;indent=true&#39;
{
&amp;quot;responseHeader&amp;quot;:{
&amp;quot;status&amp;quot;:0,
&amp;quot;QTime&amp;quot;:0,
&amp;quot;params&amp;quot;:{
&amp;quot;q&amp;quot;:&amp;quot;id:18ea1525-2513-430a-8817-a834cd733fbc&amp;quot;,
&amp;quot;indent&amp;quot;:&amp;quot;true&amp;quot;,
&amp;quot;wt&amp;quot;:&amp;quot;json&amp;quot;}},
&amp;quot;response&amp;quot;:{&amp;quot;numFound&amp;quot;:1,&amp;quot;start&amp;quot;:0,&amp;quot;docs&amp;quot;:[
{
&amp;quot;id&amp;quot;:&amp;quot;18ea1525-2513-430a-8817-a834cd733fbc&amp;quot;,
&amp;quot;field&amp;quot;:&amp;quot;dc_contributor_author&amp;quot;,
&amp;quot;value&amp;quot;:&amp;quot;Grace, Delia&amp;quot;,
&amp;quot;deleted&amp;quot;:false,
&amp;quot;creation_date&amp;quot;:&amp;quot;2016-12-07T10:54:34.356Z&amp;quot;,
&amp;quot;last_modified_date&amp;quot;:&amp;quot;2016-12-07T10:54:34.356Z&amp;quot;,
&amp;quot;authority_type&amp;quot;:&amp;quot;person&amp;quot;,
&amp;quot;first_name&amp;quot;:&amp;quot;Delia&amp;quot;,
&amp;quot;last_name&amp;quot;:&amp;quot;Grace&amp;quot;}]
}}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;So now I could set them all to this ID and the name would be ok, but there has to be a better way!&lt;/li&gt;
&lt;li&gt;In this case it seems that since there were also two different IDs in the original database, I just picked the wrong one!&lt;/li&gt;
&lt;li&gt;Better to use:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace#= update metadatavalue set text_value=&#39;Grace, Delia&#39;, authority=&#39;bfa61d7c-7583-4175-991c-2e7315000f0c&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Grace, D%&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;This proves that unifying author name varieties in authorities is easy, but fixing the name in the authority is tricky!&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>

View File

@ -253,6 +253,143 @@ UPDATE 561
&lt;li&gt;In other news, it seems the batch edit patch is working, there are no more WARN errors in the logs and the batch edit seems to work&lt;/li&gt;
&lt;li&gt;I need to check the CGSpace logs to see if there are still errors there, and then deploy/monitor it there&lt;/li&gt;
&lt;li&gt;Paola from CCAFS mentioned she also has the &amp;ldquo;take task&amp;rdquo; bug on CGSpace&lt;/li&gt;
&lt;li&gt;Reading about &lt;a href=&#34;https://www.postgresql.org/docs/9.5/static/runtime-config-resource.html&#34;&gt;&lt;code&gt;shared_buffers&lt;/code&gt; in PostgreSQL configuration&lt;/a&gt; (default is 128MB)&lt;/li&gt;
&lt;li&gt;Looks like we have ~5GB of memory used by caches on the test server (after OS and JVM heap!), so we might as well bump up the buffers for Postgres&lt;/li&gt;
&lt;li&gt;The docs say a good starting point for a dedicated server is 25% of the system RAM, and our server isn&amp;rsquo;t dedicated (also runs Solr, which can benefit from OS cache) so let&amp;rsquo;s try 1024MB&lt;/li&gt;
&lt;li&gt;In other news, the authority reindexing keeps crashing (I was manually running it after the author updates above):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ time JAVA_OPTS=&amp;quot;-Xms768m -Xmx768m -Dfile.encoding=UTF-8&amp;quot; /home/dspacetest.cgiar.org/bin/dspace index-authority
Retrieving all data
Initialize org.dspace.authority.indexer.DSpaceAuthorityIndexer
Exception: null
java.lang.NullPointerException
at org.dspace.authority.AuthorityValueGenerator.generateRaw(AuthorityValueGenerator.java:82)
at org.dspace.authority.AuthorityValueGenerator.generate(AuthorityValueGenerator.java:39)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.prepareNextValue(DSpaceAuthorityIndexer.java:201)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:132)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:159)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.AuthorityIndexClient.main(AuthorityIndexClient.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
real 8m39.913s
user 1m54.190s
sys 0m22.647s
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-12-07&#34;&gt;2016-12-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;For what it&amp;rsquo;s worth, after running the same SQL updates on my local test server, &lt;code&gt;index-authority&lt;/code&gt; runs and completes just fine&lt;/li&gt;
&lt;li&gt;I will have to test more&lt;/li&gt;
&lt;li&gt;Anyways, I noticed that some of the authority values I set actually have versions of author names we don&amp;rsquo;t want, ie &amp;ldquo;Grace, D.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;For example, do a Solr query for &amp;ldquo;first_name:Grace&amp;rdquo; and look at the results&lt;/li&gt;
&lt;li&gt;Querying that ID shows the fields that need to be changed:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;{
&amp;quot;responseHeader&amp;quot;: {
&amp;quot;status&amp;quot;: 0,
&amp;quot;QTime&amp;quot;: 1,
&amp;quot;params&amp;quot;: {
&amp;quot;q&amp;quot;: &amp;quot;id:0b4fcbc1-d930-4319-9b4d-ea1553cca70b&amp;quot;,
&amp;quot;indent&amp;quot;: &amp;quot;true&amp;quot;,
&amp;quot;wt&amp;quot;: &amp;quot;json&amp;quot;,
&amp;quot;_&amp;quot;: &amp;quot;1481102189244&amp;quot;
}
},
&amp;quot;response&amp;quot;: {
&amp;quot;numFound&amp;quot;: 1,
&amp;quot;start&amp;quot;: 0,
&amp;quot;docs&amp;quot;: [
{
&amp;quot;id&amp;quot;: &amp;quot;0b4fcbc1-d930-4319-9b4d-ea1553cca70b&amp;quot;,
&amp;quot;field&amp;quot;: &amp;quot;dc_contributor_author&amp;quot;,
&amp;quot;value&amp;quot;: &amp;quot;Grace, D.&amp;quot;,
&amp;quot;deleted&amp;quot;: false,
&amp;quot;creation_date&amp;quot;: &amp;quot;2016-11-10T15:13:40.318Z&amp;quot;,
&amp;quot;last_modified_date&amp;quot;: &amp;quot;2016-11-10T15:13:40.318Z&amp;quot;,
&amp;quot;authority_type&amp;quot;: &amp;quot;person&amp;quot;,
&amp;quot;first_name&amp;quot;: &amp;quot;D.&amp;quot;,
&amp;quot;last_name&amp;quot;: &amp;quot;Grace&amp;quot;
}
]
}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I think I can just update the &lt;code&gt;value&lt;/code&gt;, &lt;code&gt;first_name&lt;/code&gt;, and &lt;code&gt;last_name&lt;/code&gt; fields&amp;hellip;&lt;/li&gt;
&lt;li&gt;The update syntax should be something like this, but I&amp;rsquo;m getting errors from Solr:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl &#39;localhost:8081/solr/authority/update?commit=true&amp;amp;wt=json&amp;amp;indent=true&#39; -H &#39;Content-type:application/json&#39; -d &#39;[{&amp;quot;id&amp;quot;:&amp;quot;1&amp;quot;,&amp;quot;price&amp;quot;:{&amp;quot;set&amp;quot;:100}}]&#39;
{
&amp;quot;responseHeader&amp;quot;:{
&amp;quot;status&amp;quot;:400,
&amp;quot;QTime&amp;quot;:0},
&amp;quot;error&amp;quot;:{
&amp;quot;msg&amp;quot;:&amp;quot;Unexpected character &#39;[&#39; (code 91) in prolog; expected &#39;&amp;lt;&#39;\n at [row,col {unknown-source}]: [1,1]&amp;quot;,
&amp;quot;code&amp;quot;:400}}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;When I try using the XML format I get an error that the &lt;code&gt;updateLog&lt;/code&gt; needs to be configured for that core&lt;/li&gt;
&lt;li&gt;Maybe I can just remove the authority UUID from the records, run the indexing again so it creates a new one for each name variant, then match them correctly?&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set authority=null, confidence=-1 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Grace, D%&#39;;
UPDATE 561
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Then I&amp;rsquo;ll reindex discovery and authority and see how the authority Solr core looks&lt;/li&gt;
&lt;li&gt;After this, now there are authorities for some of the &amp;ldquo;Grace, D.&amp;rdquo; and &amp;ldquo;Grace, Delia&amp;rdquo; text_values in the database (the first version is actually the same authority that already exists in the core, so it was just added back to some text_values, but the second one is new):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl &#39;localhost:8081/solr/authority/select?q=id%3A18ea1525-2513-430a-8817-a834cd733fbc&amp;amp;wt=json&amp;amp;indent=true&#39;
{
&amp;quot;responseHeader&amp;quot;:{
&amp;quot;status&amp;quot;:0,
&amp;quot;QTime&amp;quot;:0,
&amp;quot;params&amp;quot;:{
&amp;quot;q&amp;quot;:&amp;quot;id:18ea1525-2513-430a-8817-a834cd733fbc&amp;quot;,
&amp;quot;indent&amp;quot;:&amp;quot;true&amp;quot;,
&amp;quot;wt&amp;quot;:&amp;quot;json&amp;quot;}},
&amp;quot;response&amp;quot;:{&amp;quot;numFound&amp;quot;:1,&amp;quot;start&amp;quot;:0,&amp;quot;docs&amp;quot;:[
{
&amp;quot;id&amp;quot;:&amp;quot;18ea1525-2513-430a-8817-a834cd733fbc&amp;quot;,
&amp;quot;field&amp;quot;:&amp;quot;dc_contributor_author&amp;quot;,
&amp;quot;value&amp;quot;:&amp;quot;Grace, Delia&amp;quot;,
&amp;quot;deleted&amp;quot;:false,
&amp;quot;creation_date&amp;quot;:&amp;quot;2016-12-07T10:54:34.356Z&amp;quot;,
&amp;quot;last_modified_date&amp;quot;:&amp;quot;2016-12-07T10:54:34.356Z&amp;quot;,
&amp;quot;authority_type&amp;quot;:&amp;quot;person&amp;quot;,
&amp;quot;first_name&amp;quot;:&amp;quot;Delia&amp;quot;,
&amp;quot;last_name&amp;quot;:&amp;quot;Grace&amp;quot;}]
}}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;So now I could set them all to this ID and the name would be ok, but there has to be a better way!&lt;/li&gt;
&lt;li&gt;In this case it seems that since there were also two different IDs in the original database, I just picked the wrong one!&lt;/li&gt;
&lt;li&gt;Better to use:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace#= update metadatavalue set text_value=&#39;Grace, Delia&#39;, authority=&#39;bfa61d7c-7583-4175-991c-2e7315000f0c&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Grace, D%&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;This proves that unifying author name varieties in authorities is easy, but fixing the name in the authority is tricky!&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>