diff --git a/contrib/adsabs/src/java/org/apache/solr/handler/batch/BatchProviderDumpAuthorNames.java b/contrib/adsabs/src/java/org/apache/solr/handler/batch/BatchProviderDumpAuthorNames.java index e3fe5c2c9..02312038b 100644 --- a/contrib/adsabs/src/java/org/apache/solr/handler/batch/BatchProviderDumpAuthorNames.java +++ b/contrib/adsabs/src/java/org/apache/solr/handler/batch/BatchProviderDumpAuthorNames.java @@ -99,8 +99,8 @@ public void collect(int i) { String[] vals = d.getValues(f); for (String s: vals) { - //System.out.println(s); - //System.out.println(AuthorUtils.normalizeAuthor(s)); + System.out.println(s); + System.out.println(AuthorUtils.normalizeAuthor(s)); s = s.toLowerCase(); TokenStream ts = analyzer.tokenStream(targetAnalyzer, new StringReader(s)); @@ -290,7 +290,7 @@ private boolean shortened(String[]nameParts, String[][] otherNames) { if (nameParts[i].length() > 1) { nameParts[i] = nameParts[i].substring(0, 1); for (String[] other: otherNames) { - if (other[i] == null || other[i].length() < 2) + if (other.length <= i || other[i] == null || other[i].length() < 2) return false; // this may happen if synonyms map the name to a shorter version, my solution is to stop processing (cheap?) other[i] = other[i].substring(0, 1); }