Skip to content

Commit

Permalink
In the method to remove solr index, the submitDeleteTask is used.
Browse files Browse the repository at this point in the history
  • Loading branch information
taojing2002 committed Feb 14, 2019
1 parent 167f946 commit 853b789
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ public DescribeResponse describe(Session session, Identifier id)

/**
* Deletes an object from the Member Node, where the object is either a
* data object or a science metadata object.
* data object or a science metadata object. No access checking.
*
* @param session - the Session object containing the credentials for the Subject
* @param username - the name of the user who calls the method. This is only for logging.
* @param pid - The object identifier to be deleted
*
* @return pid - the identifier of the object used for the deletion
Expand Down Expand Up @@ -588,7 +588,8 @@ protected void removeSolrIndex(SystemMetadata sysMeta) {
sysMeta.setArchived(true);
sysMeta.setDateSysMetadataModified(Calendar.getInstance().getTime());
try {
MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null, false);
//MetacatSolrIndex.getInstance().submit(sysMeta.getIdentifier(), sysMeta, null, false);
MetacatSolrIndex.getInstance().submitDeleteTask(sysMeta.getIdentifier(), sysMeta);
} catch (Exception e) {
logMetacat.warn("Can't remove the solr index for pid "+sysMeta.getIdentifier().getValue());
}
Expand Down

0 comments on commit 853b789

Please sign in to comment.