Project

General

Profile

« Previous | Next » 

Revision 8744

index the ORE after we submit the metadata for indexing. https://projects.ecoinformatics.org/ecoinfo/issues/6520

View differences:

src/edu/ucsb/nceas/metacat/MetacatHandler.java
94 94
import edu.ucsb.nceas.metacat.database.DBConnection;
95 95
import edu.ucsb.nceas.metacat.database.DBConnectionPool;
96 96
import edu.ucsb.nceas.metacat.dataone.D1NodeService;
97
import edu.ucsb.nceas.metacat.dataone.MNodeService;
97 98
import edu.ucsb.nceas.metacat.dataone.SyncAccessPolicy;
98 99
import edu.ucsb.nceas.metacat.dataone.SystemMetadataFactory;
99 100
import edu.ucsb.nceas.metacat.dataone.hazelcast.HazelcastService;
......
1848 1849
                    // submit for indexing
1849 1850
                    MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null, true);
1850 1851
                    
1852
                    // [re]index the resource map now that everything is saved
1853
                    // see: https://projects.ecoinformatics.org/ecoinfo/issues/6520
1854
                    Identifier potentialOreIdentifier = new Identifier();
1855
        			potentialOreIdentifier.setValue(SystemMetadataFactory.RESOURCE_MAP_PREFIX + sysMeta.getIdentifier().getValue());
1856
        			SystemMetadata oreSystemMetadata = HazelcastService.getInstance().getSystemMetadataMap().get(potentialOreIdentifier);
1857
        			if (oreSystemMetadata != null) {
1858
                        MetacatSolrIndex.getInstance().submit(oreSystemMetadata.getIdentifier(), oreSystemMetadata, null, true);
1859
        			}
1860
                    
1851 1861
                  } catch ( McdbDocNotFoundException dnfe ) {
1852 1862
                    logMetacat.debug(
1853 1863
                      "There was a problem finding the localId " +

Also available in: Unified diff