Created
September 4, 2014 14:25
-
-
Save GervaisdeM/1d83ae78b32fbc6395e8 to your computer and use it in GitHub Desktop.
Gert's response...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi Gervais, | |
I am sorry for the delay, I have been too busy. | |
I found that the following code in dk.defxws.fgssolr.OperationsImpl | |
private void deletePid( | |
String pid, | |
String indexName, | |
StringBuffer resultXml) | |
throws java.rmi.RemoteException { | |
if (logger.isDebugEnabled()) | |
logger.debug("deletePid indexName="+indexName+" pid="+pid); | |
if (pid.length()>0 && indexDocExists(pid)) { | |
StringBuffer sb = new StringBuffer("<delete><id>"+pid+"</id></delete>"); | |
postData(config.getIndexBase(indexName)+"/update", new StringReader(sb.toString()), resultXml); | |
deleteTotal++; | |
docCount--; | |
resultXml.append("<deletePid pid=\""+pid+"\"/>\n"); | |
} | |
} | |
is responsible for avoiding the delete message, when the object is not found locally. | |
I am not sure if taking out the call to indexDocExists(pid) would solve your problem. | |
There is also the option to generate that delete document to solr in your own code following your code to delete the Fedora object. It is perfectly ok to send messages to solr without involving gsearch, so this is the solution I would recommend in the first place. If for some reason this would not solve it, the solution above could be tried. | |
Let me know how you proceed, and if you succeed. If you are not successful, I could perhaps think of other ways. | |
Cheers, | |
Gert |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment