mirror of https://github.com/apache/lucene.git
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:
parent
c04d80f55e
commit
680a0013e6
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue