From f8239f0ed7f3c861828cbb1a8ca093405a09f317 Mon Sep 17 00:00:00 2001 From: alberto Date: Mon, 18 Apr 2016 10:09:51 +0200 Subject: [PATCH] fixes #338 --- .../cz/incad/kramerius/indexer/SolrOperations.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/indexer/src/cz/incad/kramerius/indexer/SolrOperations.java b/indexer/src/cz/incad/kramerius/indexer/SolrOperations.java index 956940b225..aa557c9e46 100644 --- a/indexer/src/cz/incad/kramerius/indexer/SolrOperations.java +++ b/indexer/src/cz/incad/kramerius/indexer/SolrOperations.java @@ -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); } }