Revision 8647
Added by ben leinfelder almost 11 years ago
src/edu/ucsb/nceas/metacat/EventLog.java | ||
---|---|---|
128 | 128 |
pid.setValue(guid); |
129 | 129 |
|
130 | 130 |
// submit for indexing |
131 |
MetacatSolrIndex.getInstance().submit(pid, null, this.getIndexFields(pid, event)); |
|
131 |
MetacatSolrIndex.getInstance().submit(pid, null, this.getIndexFields(pid, event), false);
|
|
132 | 132 |
|
133 | 133 |
} catch (Exception e) { |
134 | 134 |
logMetacat.error("Could not update event index information", e); |
src/edu/ucsb/nceas/metacat/DocumentImpl.java | ||
---|---|---|
3473 | 3473 |
sysMeta.setArchived(true); |
3474 | 3474 |
sysMeta.setDateSysMetadataModified(Calendar.getInstance().getTime()); |
3475 | 3475 |
HazelcastService.getInstance().getSystemMetadataMap().put(guid, sysMeta); |
3476 |
MetacatSolrIndex.getInstance().submit(guid, sysMeta, null); |
|
3476 |
MetacatSolrIndex.getInstance().submit(guid, sysMeta, null, false);
|
|
3477 | 3477 |
} |
3478 | 3478 |
|
3479 | 3479 |
// clear cache after inserting or updating a document |
src/edu/ucsb/nceas/metacat/MetacatHandler.java | ||
---|---|---|
1846 | 1846 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
1847 | 1847 |
|
1848 | 1848 |
// submit for indexing |
1849 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null); |
|
1849 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null, true);
|
|
1850 | 1850 |
|
1851 | 1851 |
} catch ( McdbDocNotFoundException dnfe ) { |
1852 | 1852 |
logMetacat.debug( |
... | ... | |
2680 | 2680 |
try { |
2681 | 2681 |
// submit for indexing |
2682 | 2682 |
Map<String, List<Object>> fields = EventLog.getInstance().getIndexFields(identifier, Event.READ.xmlValue()); |
2683 |
MetacatSolrIndex.getInstance().submit(identifier, sysMeta, fields); |
|
2683 |
MetacatSolrIndex.getInstance().submit(identifier, sysMeta, fields, false);
|
|
2684 | 2684 |
} catch (Exception e) { |
2685 | 2685 |
failedList.add(id); |
2686 | 2686 |
logMetacat.info("Error submitting to index for pid " + id); |
... | ... | |
2779 | 2779 |
|
2780 | 2780 |
// submit for indexing |
2781 | 2781 |
Map<String, List<Object>> fields = EventLog.getInstance().getIndexFields(identifier, Event.READ.xmlValue()); |
2782 |
MetacatSolrIndex.getInstance().submit(identifier, sysMeta, fields); |
|
2782 |
MetacatSolrIndex.getInstance().submit(identifier, sysMeta, fields, false);
|
|
2783 | 2783 |
|
2784 | 2784 |
results.append("<pid>" + id + "</pid>\n"); |
2785 | 2785 |
logMetacat.debug("queued SystemMetadata for index on pid: " + id); |
... | ... | |
3280 | 3280 |
HazelcastService.getInstance().getSystemMetadataMap().put(sm.getIdentifier(), sm); |
3281 | 3281 |
|
3282 | 3282 |
// submit for indexing |
3283 |
MetacatSolrIndex.getInstance().submit(sm.getIdentifier(), sm, null); |
|
3283 |
MetacatSolrIndex.getInstance().submit(sm.getIdentifier(), sm, null, true);
|
|
3284 | 3284 |
|
3285 | 3285 |
} catch (Exception ee) { |
3286 | 3286 |
// If the file did not exist before this method was |
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java | ||
---|---|---|
1281 | 1281 |
|
1282 | 1282 |
// submit for indexing |
1283 | 1283 |
try { |
1284 |
MetacatSolrIndex.getInstance().submit(newSysMeta.getIdentifier(), newSysMeta, null); |
|
1284 |
MetacatSolrIndex.getInstance().submit(newSysMeta.getIdentifier(), newSysMeta, null, true);
|
|
1285 | 1285 |
} catch (Exception e) { |
1286 | 1286 |
logMetacat.error("Could not submit changed systemMetadata for indexing, pid: " + newSysMeta.getIdentifier().getValue(), e); |
1287 | 1287 |
} |
src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java | ||
---|---|---|
428 | 428 |
// lock and unlock of the pid happens in the subclass |
429 | 429 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysmeta.getIdentifier(), sysmeta); |
430 | 430 |
// submit for indexing |
431 |
MetacatSolrIndex.getInstance().submit(sysmeta.getIdentifier(), sysmeta, null); |
|
431 |
MetacatSolrIndex.getInstance().submit(sysmeta.getIdentifier(), sysmeta, null, true);
|
|
432 | 432 |
|
433 | 433 |
} catch (Exception e) { |
434 | 434 |
logMetacat.error("Problem creating system metadata: " + pid.getValue(), e); |
... | ... | |
1322 | 1322 |
// note: the calling subclass handles the map hazelcast lock/unlock |
1323 | 1323 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysmeta.getIdentifier(), sysmeta); |
1324 | 1324 |
// submit for indexing |
1325 |
MetacatSolrIndex.getInstance().submit(sysmeta.getIdentifier(), sysmeta, null); |
|
1325 |
MetacatSolrIndex.getInstance().submit(sysmeta.getIdentifier(), sysmeta, null, true);
|
|
1326 | 1326 |
} catch (Exception e) { |
1327 | 1327 |
throw new ServiceFailure("1190", e.getMessage()); |
1328 | 1328 |
|
... | ... | |
1343 | 1343 |
HazelcastService.getInstance().getSystemMetadataMap().lock(sysMeta.getIdentifier()); |
1344 | 1344 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
1345 | 1345 |
// submit for indexing |
1346 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null); |
|
1346 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null, true);
|
|
1347 | 1347 |
} catch (Exception e) { |
1348 | 1348 |
throw new ServiceFailure("4862", e.getMessage()); |
1349 | 1349 |
|
src/edu/ucsb/nceas/metacat/index/MetacatSolrIndex.java | ||
---|---|---|
168 | 168 |
return inputStream; |
169 | 169 |
|
170 | 170 |
} |
171 |
|
|
172 |
public void submit(Identifier pid, SystemMetadata systemMetadata, Map<String, List<Object>> fields) { |
|
171 |
|
|
172 |
public void submit(Identifier pid, SystemMetadata systemMetadata, Map<String, List<Object>> fields, boolean followRevisions) {
|
|
173 | 173 |
IndexTask task = new IndexTask(); |
174 | 174 |
task.setSystemMetadata(systemMetadata); |
175 | 175 |
task.setFields(fields); |
176 |
HazelcastService.getInstance().getIndexQueue().put(pid, task ); |
|
176 |
HazelcastService.getInstance().getIndexQueue().put(pid, task); |
|
177 |
|
|
178 |
// submit older revisions recursively otherwise they stay in the index! |
|
179 |
if (followRevisions && systemMetadata != null && systemMetadata.getObsoletes() != null) { |
|
180 |
Identifier obsoletedPid = systemMetadata.getObsoletes(); |
|
181 |
SystemMetadata obsoletedSysMeta = HazelcastService.getInstance().getSystemMetadataMap().get(obsoletedPid); |
|
182 |
this.submit(obsoletedPid, obsoletedSysMeta , null, followRevisions); |
|
183 |
} |
|
184 |
|
|
177 | 185 |
} |
178 | 186 |
|
179 | 187 |
|
src/edu/ucsb/nceas/metacat/replication/ReplicationHandler.java | ||
---|---|---|
403 | 403 |
logReplication.debug("Saving SystemMetadata to shared map: " + sysMeta.getIdentifier().getValue()); |
404 | 404 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
405 | 405 |
// submit for indexing |
406 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null); |
|
406 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null, true);
|
|
407 | 407 |
} |
408 | 408 |
|
409 | 409 |
docinfoParser.parse(new InputSource(new StringReader(docInfoStr))); |
... | ... | |
582 | 582 |
// save the system metadata |
583 | 583 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
584 | 584 |
// submit for indexing |
585 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null); |
|
585 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null, true);
|
|
586 | 586 |
|
587 | 587 |
} |
588 | 588 |
|
... | ... | |
881 | 881 |
.getBytes("UTF-8"))); |
882 | 882 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
883 | 883 |
// submit for indexing |
884 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null); |
|
884 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null, true);
|
|
885 | 885 |
} |
886 | 886 |
|
887 | 887 |
logReplication.info("ReplicationHandler.handleSystemMetadata - Successfully replicated system metadata for guid: " |
src/edu/ucsb/nceas/metacat/replication/ReplicationService.java | ||
---|---|---|
636 | 636 |
// save the system metadata |
637 | 637 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
638 | 638 |
// submit for indexing |
639 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null); |
|
639 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null, true);
|
|
640 | 640 |
} |
641 | 641 |
|
642 | 642 |
// dates |
... | ... | |
933 | 933 |
// save the system metadata |
934 | 934 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
935 | 935 |
// submit for indexing |
936 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null); |
|
936 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null, true);
|
|
937 | 937 |
} |
938 | 938 |
|
939 | 939 |
// process the access control |
... | ... | |
1205 | 1205 |
new ByteArrayInputStream(systemMetadataXML.getBytes("UTF-8"))); |
1206 | 1206 |
HazelcastService.getInstance().getSystemMetadataMap().put(sysMeta.getIdentifier(), sysMeta); |
1207 | 1207 |
// submit for indexing |
1208 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null); |
|
1208 |
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null, true);
|
|
1209 | 1209 |
} |
1210 | 1210 |
|
1211 | 1211 |
logReplication.info("ReplicationService.handleForceReplicateSystemMetadataRequest - processed guid: " + guid); |
Also available in: Unified diff
recursively submit obsoleted objects for indexing when instructed. https://projects.ecoinformatics.org/ecoinfo/issues/6424