Fixed a class casting error

This commit is contained in:
Eugene Livis 2021-01-13 13:08:48 -05:00
parent f2eadf0389
commit e2db2c2e44
2 changed files with 11 additions and 3 deletions

View File

@ -284,7 +284,11 @@ class Ingester {
//Make a SolrInputDocument out of the field map //Make a SolrInputDocument out of the field map
SolrInputDocument updateDoc = new SolrInputDocument(); SolrInputDocument updateDoc = new SolrInputDocument();
for (String key : fields.keySet()) { for (String key : fields.keySet()) {
updateDoc.addField(key, Chunker.sanitize((String)fields.get(key)).toString()); if (fields.get(key).getClass() == String.class) {
updateDoc.addField(key, Chunker.sanitize((String)fields.get(key)).toString());
} else {
updateDoc.addField(key, fields.get(key));
}
} }
try { try {

View File

@ -62,7 +62,11 @@ class LanguageSpecificContentIndexingHelper {
//Make a SolrInputDocument out of the field map //Make a SolrInputDocument out of the field map
SolrInputDocument updateDoc = new SolrInputDocument(); SolrInputDocument updateDoc = new SolrInputDocument();
for (String key : fields.keySet()) { for (String key : fields.keySet()) {
updateDoc.addField(key, Chunker.sanitize((String)fields.get(key)).toString()); if (fields.get(key).getClass() == String.class) {
updateDoc.addField(key, Chunker.sanitize((String)fields.get(key)).toString());
} else {
updateDoc.addField(key, fields.get(key));
}
} }
try { try {