X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.indexing%2Fsrc%2Forg%2Fsimantics%2Fdb%2Findexing%2FIndexedRelationsImpl.java;h=1b4d62a1d6c6cf9c6d199b7454e713232c763526;hb=965fa411938344172cff82a2ec0b6c50b7cb2b7c;hp=aaadc4704d487ddbdce71af7e59a78522648657b;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsImpl.java b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsImpl.java index aaadc4704..1b4d62a1d 100644 --- a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsImpl.java +++ b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsImpl.java @@ -392,13 +392,13 @@ public class IndexedRelationsImpl implements IndexedRelations { try { + DatabaseIndexing.markIndexChanged(processor.getSession(), searcher.getIndexPath()); if(!searcher.startAccess(null, processor.getSession(), true)) { // Could not write index for some reason. Ignore and let the next index query reinitialize the index. return; } searcher.insertIndex(progress.newChild(40), relation, 1, documents); - DatabaseIndexing.markIndexChanged(searcher.getIndexPath()); } catch (InvalidResourceReferenceException e) { throw new IndexException(e); @@ -429,13 +429,13 @@ public class IndexedRelationsImpl implements IndexedRelations { LockHandle handle = lock(processor, Pair.make(relationResource, input), true); try { + DatabaseIndexing.markIndexChanged(processor.getSession(), searcher.getIndexPath()); if(!searcher.startAccess(null, processor.getSession(), true)) { // Could not write index for some reason. Ignore and let the next index query reinitialize the index. return; } searcher.removeIndex(progress.newChild(40), relation, processor, key, keyValues); - DatabaseIndexing.markIndexChanged(searcher.getIndexPath()); } catch (DatabaseException e) { throw new IndexException(e); @@ -492,13 +492,12 @@ public class IndexedRelationsImpl implements IndexedRelations { try { + DatabaseIndexing.markIndexChanged(processor.getSession(), searcher.getIndexPath()); if(!searcher.startAccess(null, processor.getSession(), true)) { // Could not write index for some reason. Ignore and let the next index query reinitialize the index. return true; } - didChange = searcher.replaceIndex(progress.newChild(40), key, keyValues, relation, 1, documents); - if(didChange) - DatabaseIndexing.markIndexChanged(searcher.getIndexPath()); + searcher.replaceIndex(progress.newChild(40), key, keyValues, relation, 1, documents); } catch (InvalidResourceReferenceException e) { throw new IndexException(e);