X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.indexing%2Fsrc%2Forg%2Fsimantics%2Fdb%2Findexing%2FIndexedRelationsSearcherBase.java;h=5df5d68c114d37dc98de59bd6a45100e81dfda3d;hp=afcaafd51858229f8ac153c535493c1711717cef;hb=ad0e5bf4b34705988e23c9ee3f8e4fcbb760c701;hpb=0f2d6b33db9eabe0c1b142f6d0197a5d1446c3b1 diff --git a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcherBase.java b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcherBase.java index afcaafd51..5df5d68c1 100644 --- a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcherBase.java +++ b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcherBase.java @@ -347,6 +347,7 @@ abstract public class IndexedRelationsSearcherBase { removedTerm = new Term(key, (String) keyValue); } else { // FIXME: should throw an exception for illegal input data but this would leave the index in an incoherent state + getLogger().error("Attempting to remove document from index of {} with key {} and unrecognized key value type {} : {}", input, key, keyValue, keyValue != null ? keyValue.getClass() : "null"); continue; } @@ -433,7 +434,7 @@ abstract public class IndexedRelationsSearcherBase { boolean done = false; if(requireChangeInfoOnReplace()) { TopDocs exist = searcher.search(new TermQuery(removedTerm), null, 2); - if(exist.scoreDocs.length == 1 && requireChangeInfoOnReplace()) { + if(exist.scoreDocs.length == 1) { Document doc = reader.document(exist.scoreDocs[0].doc); if(!areSame(doc, document)) { writer.deleteDocuments(removedTerm);