Skip to content

Commit

Permalink
fixes #338
Browse files Browse the repository at this point in the history
  • Loading branch information
alberto authored and alberto committed Apr 18, 2016
1 parent 38f0492 commit f8239f0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions indexer/src/cz/incad/kramerius/indexer/SolrOperations.java
Original file line number Diff line number Diff line change
Expand Up @@ -822,9 +822,16 @@ private boolean checkIntegrityByModel(String model, int offset, int numHits) thr
node = nodeList.item(i);
PID = node.getFirstChild().getNodeValue();
pid_path = node.getNextSibling().getFirstChild().getNodeValue();

//PID with @ are virtual only in index. Test parent.
String simplePid = PID;
if(PID.indexOf("/@")>-1){
simplePid = PID.substring(0, PID.indexOf("/@")-1);
}


if(!rindex.existsPid(PID)){
logger.log(Level.INFO, PID + " doesn't exist. Deleting...");
if(!rindex.existsPid(simplePid)){
logger.log(Level.INFO, simplePid + " doesn't exist. Deleting...");
deletePid(PID);
}
}
Expand Down

0 comments on commit f8239f0

Please sign in to comment.