Project

General

Profile

« Previous | Next » 

Revision 8884

Added by Jing Tao about 10 years ago

change the way to delete the solr index of a resource map.

View differences:

src/edu/ucsb/nceas/metacat/DocumentImpl.java
3586 3586
                			logMetacat.debug("the system metadata contains the key - guid "+guid.getValue()+" before removing is "+HazelcastService.getInstance().getSystemMetadataMap().containsKey(guid));
3587 3587
                			HazelcastService.getInstance().getSystemMetadataMap().remove(guid);
3588 3588
                			logMetacat.debug("the system metadata contains the guid "+guid.getValue()+" after removing is "+HazelcastService.getInstance().getSystemMetadataMap().containsKey(guid));
3589
                			if(ResourceMapNamespaces.isResourceMap(sysMeta.getFormatId())) {
3590
                				byte[] resourceMapData = FileUtils.readFileToByteArray(new File(getFilePath(accnum, isXML)));
3591
                				MetacatSolrIndex.getInstance().submit(guid, sysMeta, null, false, resourceMapData);
3592
                			} else {
3593
                				MetacatSolrIndex.getInstance().submit(guid, sysMeta, null, false);
3594
                			}
3589
                			MetacatSolrIndex.getInstance().submit(guid, sysMeta, null, false);
3595 3590
                		} catch (RuntimeException ee) {
3596 3591
                			logMetacat.warn("we catch the run time exception in deleting system metadata "+ee.getMessage());
3597 3592
                			throw new Exception("DocumentImpl.delete -"+ee.getMessage());

Also available in: Unified diff