IndexUpdate implements Editor, PathSource { public void setIgnoreReindexFlags(boolean ignoreReindexFlag){ rootState.setIgnoreReindexFlags(ignoreReindexFlag); } IndexUpdate(
            IndexEditorProvider provider, String async,
            NodeState root, NodeBuilder builder,
            IndexUpdateCallback updateCallback);  IndexUpdate(
            IndexEditorProvider provider, String async,
            NodeState root, NodeBuilder builder,
            IndexUpdateCallback updateCallback, CommitInfo commitInfo);  IndexUpdate(
            IndexEditorProvider provider, String async,
            NodeState root, NodeBuilder builder,
            IndexUpdateCallback updateCallback, NodeTraversalCallback traversalCallback,
            CommitInfo commitInfo, CorruptIndexHandler corruptIndexHandler); private  IndexUpdate(IndexUpdate parent, String name); @Override void enter(NodeState before, NodeState after); boolean isReindexingPerformed(); List<String> getReindexStats(); Set<String> getUpdatedIndexPaths(); void setTraversalRateEstimator(TraversalRateEstimator estimator); void setNodeCountEstimator(NodeCountEstimator nodeCountEstimator); String getIndexingStats(); void setIgnoreReindexFlags(boolean ignoreReindexFlag); @Override String getPath(); @Override void leave(NodeState before, NodeState after); @Override void propertyAdded(PropertyState after); @Override void propertyChanged(PropertyState before, PropertyState after); @Override void propertyDeleted(PropertyState before); @Override @NotNull Editor childNodeAdded(String name, NodeState after); @Override @NotNull Editor childNodeChanged(
            String name, NodeState before, NodeState after); @Override @Nullable Editor childNodeDeleted(String name, NodeState before); void commitProgress(IndexProgress indexProgress); IndexUpdate withMissingProviderStrategy(
            MissingIndexProviderStrategy missingProvider);  }
@Test public void ignoreReindexingFlag() throws Exception{ String indexPath = "/oak:index/rootIndex"; CallbackCapturingProvider provider = new CallbackCapturingProvider(); IndexUpdateProvider indexUpdate = new IndexUpdateProvider(provider); EditorHook hook = new EditorHook(indexUpdate); NodeState before = builder.getNodeState(); createIndexDefinition(builder.child(INDEX_DEFINITIONS_NAME), "rootIndex", true, false, ImmutableSet.of("foo"), null); builder.child("a").setProperty("foo", "abc"); NodeState after = builder.getNodeState(); NodeState indexed = hook.processCommit(before, after, CommitInfo.EMPTY); assertTrue(provider.getContext(indexPath).isReindexing()); before = indexed; builder = before.builder(); builder.child("b").setProperty("foo", "xyz"); child(builder, indexPath).setProperty(IndexConstants.REINDEX_PROPERTY_NAME, true); after = builder.getNodeState(); provider.reset(); indexed = hook.processCommit(before, after, CommitInfo.EMPTY); assertTrue(provider.getContext(indexPath).isReindexing()); indexUpdate.setIgnoreReindexFlags(true); indexed = hook.processCommit(before, after, CommitInfo.EMPTY); assertFalse(provider.getContext(indexPath).isReindexing()); PropertyIndexLookup lookup = new PropertyIndexLookup(indexed); assertFalse(find(lookup, "foo", "xyz").isEmpty()); }