Project

General

Profile

« Previous | Next » 

Revision 8862

Added by Jing Tao over 10 years ago

Add codes to handle remove a source map solr index.

View differences:

metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SystemMetadataEventListener.java
131 131
		IndexTask task = entryEvent.getValue();
132 132
		SystemMetadata systemMetadata = task.getSystemMetadata();
133 133
		Map<String, List<Object>> fields = task.getFields();
134
		byte[] resourceMapData = task.getResourceMapData();
134 135
		
135 136
		/*if(systemMetadata == null) {
136 137
		    writeEventLog(systemMetadata, pid, "SystemMetadataEventListener.itemAdded -could not get the SystemMetadata");
......
143 144
		}
144 145
		
145 146
		if (systemMetadata != null) {
146
			solrIndex.update(pid, systemMetadata);
147
			if(resourceMapData == null) {
148
				solrIndex.update(pid, systemMetadata);
149
			} else {
150
				solrIndex.updateResourceMap(pid, systemMetadata, resourceMapData);
151
			}
152
			
147 153
		}
148 154
		if (fields != null) {
149 155
			solrIndex.insertFields(pid, fields);

Also available in: Unified diff