public IndexDefinition build(){ if (version == null){ version = determineIndexFormatVersion(defn); } if (uid == null){ uid = determineUniqueId(defn); if (uid == null && !IndexDefinition.hasPersistedIndex(defn)){ uid = DEFAULT_UID; } } NodeState indexDefnStateToUse = defn; if (!reindexMode){ indexDefnStateToUse = getIndexDefinitionState(defn); } return createInstance(indexDefnStateToUse); }
@Test public void hasPersistedIndex() throws Exception{ assertFalse(IndexDefinition.hasPersistedIndex(builder.getNodeState())); builder.child(":status"); assertTrue(IndexDefinition.hasPersistedIndex(builder.getNodeState())); }
@Test public void hasPersistedIndex() throws Exception{ assertFalse(IndexDefinition.hasPersistedIndex(builder.getNodeState())); builder.child(":status"); assertTrue(IndexDefinition.hasPersistedIndex(builder.getNodeState())); }