Source:
<code>protected void buildDocument(Context context, Item item) throws SQLException, IOException { String handle = item.getHandle(); if (handle == null) { handle = handleService.findHandle(context, item); } List<String> locations = getItemLocations(context, item); SolrInputDocument doc = buildDocument(Constants.ITEM, item.getID(), handle, locations); log.debug("Building Item: " + handle); doc.addField("archived", item.isArchived()); doc.addField("withdrawn", item.isWithdrawn()); doc.addField("discoverable", item.isDiscoverable()); doc.addField("lastModified", item.getLastModified()); if (item.getSubmitter() != null) { doc.addField("submitter", item.getSubmitter().getID()); } List<DiscoveryConfiguration> discoveryConfigurations = SearchUtils.getAllDiscoveryConfigurations(item); addDiscoveryFields(doc, context, item, discoveryConfigurations); final String typeText = StringUtils.deleteWhitespace(item.getTypeText().toLowerCase()); String acvalue = DSpaceServicesFactory.getInstance().getConfigurationService().getProperty( "discovery.facet.namedtype." + typeText, typeText + SolrServiceImpl.AUTHORITY_SEPARATOR + typeText); if (StringUtils.isNotBlank(acvalue)) { String fvalue = acvalue; addNamedResourceTypeIndex(doc, acvalue, fvalue); } try { writeDocument(doc, new FullTextContentStreams(context, item)); log.info("Wrote Item: " + handle + " to Index"); } catch (RuntimeException e) { <START> log.error("Error while writing item to discovery index: " + handle + " message:" + e.getMessage(), e); <END> } }</code><technical_language>log messages (this in try) reporting handle, updated others report uniqueID. lines updated</technical_language>

Target:
protected void buildDocument(Context context, Item item) throws SQLException, IOException { String handle = item.getHandle(); if (handle == null) { handle = handleService.findHandle(context, item); } List<String> locations = getItemLocations(context, item); SolrInputDocument doc = buildDocument(Constants.ITEM, item.getID(), handle, locations); log.debug("Building Item: " + handle); doc.addField("archived", item.isArchived()); doc.addField("withdrawn", item.isWithdrawn()); doc.addField("discoverable", item.isDiscoverable()); doc.addField("lastModified", item.getLastModified()); EPerson submitter = item.getSubmitter(); if (submitter != null) { addFacetIndex(doc, "submitter", submitter.getID().toString(), submitter.getFullName()); } List<DiscoveryConfiguration> discoveryConfigurations = SearchUtils.getAllDiscoveryConfigurations(item); addDiscoveryFields(doc, context, item, discoveryConfigurations); final String typeText = StringUtils.deleteWhitespace(item.getTypeText().toLowerCase()); String acvalue = DSpaceServicesFactory.getInstance().getConfigurationService().getProperty( "discovery.facet.namedtype." + typeText, typeText + SolrServiceImpl.AUTHORITY_SEPARATOR + typeText); if (StringUtils.isNotBlank(acvalue)) { addNamedResourceTypeIndex(doc, acvalue); } try { writeDocument(doc, new FullTextContentStreams(context, item)); log.info("Wrote Item: " + item.getUniqueIndexID() + " to Index"); } catch (RuntimeException e) { log.error("Error while writing item to discovery index: " + item.getUniqueIndexID() + " message:" + e.getMessage(), e); } }