IndexStore { public void clearInView(T element, GraphView view) { ElementImpl elementImpl = (ElementImpl) element; lock(); try { IndexImpl<T> index = viewIndexes.get(view); if (index != null) { final int length = columnStore.length; final ColumnImpl[] cols = columnStore.columns; for (int i = 0; i < length; i++) { Column c = cols[i]; if (c != null && c.isIndexed()) { Object value = elementImpl.attributes[c.getIndex()]; index.remove(c, value, element); } } } } finally { unlock(); } } IndexStore(ColumnStore<T> columnStore); Object set(Column column, Object oldValue, Object value, T element); void clear(T element); void index(T element); void indexView(Graph graph); void indexInView(T element, GraphView view); void clearInView(T element, GraphView view); void clear(GraphView view); void clear();  }
@Test public void testClearInView() { GraphStore graphStore = generateBasicGraphStoreWithColumns(); GraphView view = graphStore.viewStore.createView(); Graph graph = graphStore.viewStore.getGraph(view); Column column = graphStore.nodeTable.store.getColumn("foo"); Node n1 = graphStore.factory.newNode("1"); n1.setAttribute(column, "bar"); graphStore.addNode(n1); graph.addNode(n1); IndexStore<Node> indexStore = graphStore.nodeTable.store.indexStore; IndexImpl index = indexStore.createViewIndex(graphStore.viewStore.getGraph(view)); graph.removeNode(n1); Assert.assertEquals(index.countElements(column), 0); Assert.assertEquals(index.countValues(column), 0); Assert.assertEquals(index.count(column, "bar"), 0); }