[
https://jira.duraspace.org/browse/DS-997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=22010#comment-22010
]
Tim Donohue commented on DS-997:
--------------------------------
Would it be possible just to take the *first* value, if there are multiple
values and you need to sort on them?
So, if there were two 'accession' dates:
dc.accession.date = 2005
dc.accession.date = 2011
Then you'd just use the *first* one you find (in this case 2005) as the sort
index, and essentially 'ignore' the second one.
That might be a quick way to fix this, so that Discovery at least doesn't throw
severe errors. I'd rather Discovery attempt to "work around" semi-ugly
metadata, then to throw errors when encountering it.
> Discovery errors out if an item has multiple 'dc.date.accessioned' values
> -------------------------------------------------------------------------
>
> Key: DS-997
> URL: https://jira.duraspace.org/browse/DS-997
> Project: DSpace
> Issue Type: Bug
> Components: Discovery, Solr
> Affects Versions: 1.8.0
> Reporter: Tim Donohue
> Priority: Major
>
> Here's how you can replicate this issue.
> * Modify a single item such that it has two "dc.date.accessioned" values.
> * Restart Tomcat/Solr (may not even be necessary)
> In the Tomcat logs you will see errors like:
> Aug 17, 2011 12:54:18 PM org.apache.solr.common.SolrException log
> SEVERE: org.apache.solr.common.SolrException: can not sort on multivalued
> field: dc.date.accessioned_dt
> at
> org.apache.solr.schema.SchemaField.checkSortability(SchemaField.java:154)
> This error seems to cause the Item to no longer be available from Discovery
> or the UI in general.
> Although most items in DSpace should only ever have one
> 'dc.date.accessioned', it still is not impossible to have multiple values.
> If you import any item which already has an existing 'dc.date.accessioned'
> value (for whatever reason), DSpace will keep that value & also add a new one
> representing the new DSpace Accession Date (see the InstallItem class).
> In general, if possible, it'd be best for Discovery to not assume a single
> value for any 'dc.date' fields.
> This same issue also occurs if you manually add a second 'dc.date.issued'
> value. You'll see similar errors stating "can not sort on multivalued field:
> dc.date.issued.year".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.duraspace.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel