SOLR-1228

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@785965 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2009-06-18 08:59:46 +00:00
parent c04d80f55e
commit 680a0013e6
1 changed files with 14 additions and 0 deletions

View File

@ -272,6 +272,20 @@ public class DocBuilder {
Iterator<Map<String, Object>> iter = deletedKeys.iterator(); Iterator<Map<String, Object>> iter = deletedKeys.iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
Map<String, Object> map = iter.next(); Map<String, Object> map = iter.next();
Object key = null;
if(root.pk != null){
key = map.get(root.pk);
}
if(key == null && map.size() ==1){
for (Map.Entry<String, Object> e : map.entrySet()) {
key = e.getValue();
break;
}
}
if(key == null) {
LOG.warn("no key was available for deleteted pk query");
continue;
}
writer.deleteDoc(map.get(root.pk)); writer.deleteDoc(map.get(root.pk));
importStatistics.deletedDocCount.incrementAndGet(); importStatistics.deletedDocCount.incrementAndGet();
iter.remove(); iter.remove();