Skip to content

Instantly share code, notes, and snippets.

@zuki
Created April 28, 2014 08:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zuki/11365437 to your computer and use it in GitHub Desktop.
Save zuki/11365437 to your computer and use it in GitHub Desktop.
Proposed fixing code for SolrBrowseCreateDAO.java
diff --git a/dspace-api/src/main/java/org/dspace/browse/SolrBrowseCreateDAO.java b/dspace-api/src/main/java/org/dspace/browse/SolrBrowseCreateDAO.java
index ff316d5..e82cbed 100644
--- a/dspace-api/src/main/java/org/dspace/browse/SolrBrowseCreateDAO.java
+++ b/dspace-api/src/main/java/org/dspace/browse/SolrBrowseCreateDAO.java
@@ -195,8 +195,8 @@ public class SolrBrowseCreateDAO implements BrowseCreateDAO,
// is there any valid (with appropriate
// confidence) authority key?
- if ((ignoreAuthority && !bi.isAuthorityIndex())
- || (values[x].authority != null && values[x].confidence >= minConfidence))
+ if (!ignoreAuthority && !bi.isAuthorityIndex()
+ && values[x].authority != null && values[x].confidence >= minConfidence)
{
distFAuths.add(values[x].authority);
distValuesForAC.add(values[x].value);
@@ -225,6 +225,11 @@ public class SolrBrowseCreateDAO implements BrowseCreateDAO,
values[x].authority,
values[x].language);
}
+ else
+ {
+ preferedLabel = values[x].value;
+ }
+
List<String> variants = null;
boolean ignoreVariants = new DSpace()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment