You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2015/06/03 02:12:33 UTC

[28/50] [abbrv] incubator-tinkerpop git commit: gutted automatic indices for Neo4jGraph. Gutted it from the docs.

gutted automatic indices for Neo4jGraph. Gutted it from the docs.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/38a225ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/38a225ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/38a225ed

Branch: refs/heads/preprocessor
Commit: 38a225edd1ae104868c5edde6bc1ebea191b9197
Parents: e4a4d52
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri May 29 14:56:45 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri May 29 14:56:45 2015 -0600

----------------------------------------------------------------------
 docs/src/implementations.asciidoc               | 41 ++-------
 .../step/sideEffect/Neo4jGraphStep.java         | 96 ++------------------
 .../gremlin/neo4j/structure/Neo4jGraph.java     |  4 +
 .../neo4j/AbstractNeo4jGraphProvider.java       | 36 +-------
 .../structure/NativeNeo4jStructureTest.java     | 46 ----------
 5 files changed, 23 insertions(+), 200 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/38a225ed/docs/src/implementations.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/implementations.asciidoc b/docs/src/implementations.asciidoc
index 061f06a..d5f5632 100644
--- a/docs/src/implementations.asciidoc
+++ b/docs/src/implementations.asciidoc
@@ -561,17 +561,14 @@ TIP: To host Neo4j in Gremlin Server, the dependencies must first be "installed"
 Indices
 ~~~~~~~
 
-Neo4j 2.x supports two types of indices: link:http://docs.neo4j.org/chunked/stable/query-schema-index.html[schema indices] and link:http://docs.neo4j.org/chunked/stable/auto-indexing.html[automatic indices]. Automatic indices have been around since Neo4j 1.x and automatically index an element based on a pre-defined property keys. Schema indices are new to Neo4j 2.x and leverage vertex labels to partition the index space. TinkerPop3 does not provide method interfaces for defining schemas/indices for the underlying graph system. Thus, in order to create indices, the Neo4j API is leveraged.
+Neo4j 2.x indices leverage vertex labels to partition the index space. TinkerPop3 does not provide method interfaces for defining schemas/indices for the underlying graph system. Thus, in order to create indices, it is important to call the Neo4j API directly.
 
-NOTE: `Neo4jGraph` will attempt to discern which indices to use when executing a traversal of the form `g.V().has()`. The general order of checking is: schema indices, automatic indices, label grouping linear-scan iteration, full linear-scan iteration.
+NOTE: `Neo4jGraphStep` will attempt to discern which indices to use when executing a traversal of the form `g.V().has()`. The general order of checking is: indices, label grouping linear-scan iteration, full linear-scan iteration.
 
-Using Schema Indices
-^^^^^^^^^^^^^^^^^^^^
-
-The Gremlin-Console session below demonstrates schema indices. For more information, please refer to the Neo4j documentation:
+The Gremlin-Console session below demonstrates Neo4j indices. For more information, please refer to the Neo4j documentation:
 
-* Manipulating schema indices with link:http://docs.neo4j.org/chunked/stable/query-schema-index.html[Cypher].
-* Manipulating schema indices with the Neo4j link:http://docs.neo4j.org/chunked/stable/tutorials-java-embedded-new-index.html[Java API].
+* Manipulating indices with link:http://docs.neo4j.org/chunked/stable/query-schema-index.html[Cypher].
+* Manipulating indices with the Neo4j link:http://docs.neo4j.org/chunked/stable/tutorials-java-embedded-new-index.html[Java API].
 
 [source,groovy]
 gremlin> graph = Neo4jGraph.open('/tmp/neo4j')
@@ -593,7 +590,7 @@ gremlin> g = graph.traversal(standard())
 gremlin> g.V().hasLabel('person').has('name','marko').values('name')
 ==>marko
 
-Below demonstrates the runtime benefits of indices and demonstrates how if there is no defined schema index (only vertex labels), a linear scan of the vertex-label partition is still faster than a linear scan of all vertices.
+Below demonstrates the runtime benefits of indices and demonstrates how if there is no defined index (only vertex labels), a linear scan of the vertex-label partition is still faster than a linear scan of all vertices.
 
 [source,groovy]
 gremlin> graph = Neo4jGraph.open('/tmp/neo4j')
@@ -630,32 +627,6 @@ gremlin> clock(1000){g.V().has('name','Garcia').next()} <6>
 <5> Find all artists whose name is Garcia which does a linear scan of the artist vertex-label partition.
 <6> Find all vertices whose name is Garcia which requires a linear scan of all the data in the graph.
 
-
-Using Automatic Indices
-^^^^^^^^^^^^^^^^^^^^^^^
-
-The Gremlin-Console session below demonstrates automatic indices. For more information, please refer to the Neo4j documentation:
-
-* Manipulating automatic indices with the Neo4j link:http://docs.neo4j.org/chunked/stable/auto-indexing.html[Java API].
-
-[source,groovy]
-gremlin> graph = Neo4jGraph.open('/tmp/neo4j')
-==>neo4jgraph[EmbeddedGraphDatabase [/tmp/neo4j]]
-gremlin> graph.getBaseGraph().index().getNodeAutoIndexer().startAutoIndexingProperty('name')
-==>null
-gremlin> graph.getBaseGraph().index().getNodeAutoIndexer().setEnabled(true)
-==>null
-gremlin> graph.addVertex(label,'person','name','marko')
-==>v[0]
-gremlin> graph.addVertex(label,'dog','name','puppy')
-==>v[1]
-gremlin> g = graph.traversal(standard())
-==>graphtraversalsource[neo4jgraph[EmbeddedGraphDatabase [/tmp/neo4j]], standard]
-gremlin> g.V().hasLabel('person').has('name','marko').values('name')
-==>marko
-
-WARNING: The preferred method for dealing with automatic indices in Neo4j is via `Neo4jGraph.open()` configuration as opposed to runtime updating as demonstrated above. This is because with runtime updating, index information is not propagated across Neo4j connections.
-
 Cypher
 ~~~~~~
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/38a225ed/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java
index dbc5a32..949a22a 100644
--- a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java
+++ b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/process/traversal/step/sideEffect/Neo4jGraphStep.java
@@ -18,7 +18,6 @@
  */
 package org.apache.tinkerpop.gremlin.neo4j.process.traversal.step.sideEffect;
 
-import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jEdge;
 import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph;
 import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jVertex;
 import org.apache.tinkerpop.gremlin.neo4j.structure.trait.MultiMetaNeo4jTrait;
@@ -43,6 +42,7 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
+import java.util.function.Predicate;
 import java.util.stream.Stream;
 
 /**
@@ -63,33 +63,21 @@ public final class Neo4jGraphStep<S extends Element> extends GraphStep<S> {
     }
 
     private Iterator<? extends Edge> edges() {
-        final Neo4jGraph graph = (Neo4jGraph) this.getTraversal().getGraph().get();
-        graph.tx().readWrite();
-        // ids are present, filter on them first
-        if (this.ids != null && this.ids.length > 0)
-            return IteratorUtils.filter(graph.edges(this.ids), edge -> HasContainer.testAll((Edge) edge, this.hasContainers));
-        final HasContainer hasContainer = this.getHasContainerForAutomaticIndex(Edge.class);
-        return (null == hasContainer) ?
-                IteratorUtils.filter(graph.edges(), edge -> HasContainer.testAll((Edge) edge, this.hasContainers)) :
-                getEdgesUsingAutomaticIndex(hasContainer).filter(edge -> HasContainer.testAll((Edge) edge, this.hasContainers)).iterator();
+        return IteratorUtils.filter(this.getTraversal().getGraph().get().edges(this.ids), edge -> HasContainer.testAll((Edge) edge, this.hasContainers));
     }
 
     private Iterator<? extends Vertex> vertices() {
         final Neo4jGraph graph = (Neo4jGraph) this.getTraversal().getGraph().get();
-        graph.tx().readWrite();
         // ids are present, filter on them first
         if (this.ids != null && this.ids.length > 0)
             return IteratorUtils.filter(graph.vertices(this.ids), vertex -> HasContainer.testAll((Vertex) vertex, this.hasContainers));
+        ////// do index lookups //////
+        graph.tx().readWrite();
         // a label and a property
         final Pair<String, HasContainer> labelHasPair = this.getHasContainerForLabelIndex();
         if (null != labelHasPair)
             return this.getVerticesUsingLabelAndProperty(labelHasPair.getValue0(), labelHasPair.getValue1())
                     .filter(vertex -> HasContainer.testAll((Vertex) vertex, this.hasContainers)).iterator();
-        // use automatic indices
-        final HasContainer hasContainer = this.getHasContainerForAutomaticIndex(Vertex.class);
-        if (null != hasContainer)
-            return this.getVerticesUsingAutomaticIndex(hasContainer)
-                    .filter(vertex -> HasContainer.testAll((Vertex) vertex, this.hasContainers)).iterator();
         // only labels
         final List<String> labels = this.getInternalLabels();
         if (null != labels)
@@ -100,49 +88,28 @@ public final class Neo4jGraphStep<S extends Element> extends GraphStep<S> {
 
 
     private Stream<Neo4jVertex> getVerticesUsingLabelAndProperty(final String label, final HasContainer hasContainer) {
-        //System.out.println("labelProperty: " + label + ":" + hasContainer);
         final Neo4jGraph graph = (Neo4jGraph) this.getTraversal().getGraph().get();
         final Iterable<Neo4jNode> iterator1 = graph.getBaseGraph().findNodes(label, hasContainer.getKey(), hasContainer.getValue());
         final Iterable<Neo4jNode> iterator2 = graph.getBaseGraph().findNodes(hasContainer.getKey(), T.value.getAccessor(), hasContainer.getValue());
         final Stream<Neo4jVertex> stream1 = IteratorUtils.stream(iterator1)
                 .filter(node -> ElementHelper.idExists(node.getId(), this.ids))
-                .map(node -> new Neo4jVertex(node,graph));
+                .map(node -> new Neo4jVertex(node, graph));
         final Stream<Neo4jVertex> stream2 = IteratorUtils.stream(iterator2)
                 .filter(node -> ElementHelper.idExists(node.getId(), this.ids))
                 .filter(node -> node.getProperty(T.key.getAccessor()).equals(hasContainer.getKey()))
                 .map(node -> node.relationships(Neo4jDirection.INCOMING).iterator().next().start())
-                .map(node -> new Neo4jVertex(node,graph));
+                .map(node -> new Neo4jVertex(node, graph));
         return Stream.concat(stream1, stream2);
     }
 
     private Stream<Neo4jVertex> getVerticesUsingOnlyLabels(final List<String> labels) {
-        //System.out.println("labels: " + labels);
         final Neo4jGraph graph = (Neo4jGraph) this.getTraversal().getGraph().get();
+        final Predicate<Neo4jNode> nodePredicate = graph.getTrait().getNodePredicate();
         return labels.stream()
-                .filter(label -> !label.equals(MultiMetaNeo4jTrait.VERTEX_PROPERTY_LABEL))      // TODO: use predicates
                 .flatMap(label -> IteratorUtils.stream(graph.getBaseGraph().findNodes(label)))
-                .filter(node -> !node.hasLabel(MultiMetaNeo4jTrait.VERTEX_PROPERTY_LABEL))
                 .filter(node -> ElementHelper.idExists(node.getId(), this.ids))
-                .map(node -> new Neo4jVertex(node,graph));
-    }
-
-    private Stream<Neo4jVertex> getVerticesUsingAutomaticIndex(final HasContainer hasContainer) {
-        //System.out.println("automatic index: " + hasContainer);
-        final Neo4jGraph graph = (Neo4jGraph) this.getTraversal().getGraph().get();
-        return IteratorUtils.stream(graph.getBaseGraph().findNodes(hasContainer.getKey(), hasContainer.getValue()).iterator())
-                .map(node -> node.hasLabel(MultiMetaNeo4jTrait.VERTEX_PROPERTY_LABEL) ?
-                        node.relationships(Neo4jDirection.INCOMING).iterator().next().start() :
-                        node)
-                .filter(node -> ElementHelper.idExists(node.getId(), this.ids))
-                .map(node -> new Neo4jVertex(node,graph));
-    }
-
-    private Stream<Neo4jEdge> getEdgesUsingAutomaticIndex(final HasContainer hasContainer) {
-        final Neo4jGraph graph = (Neo4jGraph) this.getTraversal().getGraph().get();
-        return IteratorUtils.stream(graph.getBaseGraph().findRelationships(hasContainer.getKey(), hasContainer.getValue()).iterator())
-                .filter(relationship -> ElementHelper.idExists(relationship.getId(), this.ids))
-                .filter(relationship -> !relationship.type().startsWith(MultiMetaNeo4jTrait.VERTEX_PROPERTY_PREFIX))
-                .map(relationship -> new Neo4jEdge(relationship,graph));
+                .filter(nodePredicate)
+                .map(node -> new Neo4jVertex(node, graph));
     }
 
     private Pair<String, HasContainer> getHasContainerForLabelIndex() {
@@ -169,19 +136,6 @@ public final class Neo4jGraphStep<S extends Element> extends GraphStep<S> {
         return null;
     }
 
-    private HasContainer getHasContainerForAutomaticIndex(final Class<? extends Element> elementClass) {
-        final Neo4jGraph graph = (Neo4jGraph) this.getTraversal().getGraph().get();
-        Neo4jGraphAPI baseGraph = graph.getBaseGraph();
-        boolean isNode = elementClass.equals(Vertex.class);
-        for (final HasContainer hasContainer : this.hasContainers) {
-            if (hasContainer.getBiPredicate().equals(Compare.eq) &&
-                    baseGraph.hasAutoIndex(isNode, hasContainer.getKey())) {
-                return hasContainer;
-            }
-        }
-        return null;
-    }
-
     @Override
     public String toString() {
         if (this.hasContainers.isEmpty())
@@ -191,36 +145,4 @@ public final class Neo4jGraphStep<S extends Element> extends GraphStep<S> {
                     StringFactory.stepString(this, this.hasContainers) :
                     StringFactory.stepString(this, Arrays.toString(this.ids), this.hasContainers);
     }
-
-    /*private String makeCypherQuery() {
-        final StringBuilder builder = new StringBuilder("MATCH node WHERE ");
-        int counter = 0;
-        for (final HasContainer hasContainer : this.hasContainers) {
-            if (hasContainer.key.equals(T.label.getAccessor()) && hasContainer.predicate.equals(Compare.EQUAL)) {
-                if (counter++ > 0) builder.append(" AND ");
-                builder.append("node:").append(hasContainer.value);
-            } else {
-                if (counter++ > 0) builder.append(" AND ");
-                builder.append("node.").append(hasContainer.key).append(" ");
-                if (hasContainer.predicate instanceof Compare) {
-                    builder.append(((Compare) hasContainer.predicate).asString()).append(" ").append(toStringOfValue(hasContainer.value));
-                } else if (hasContainer.predicate.equals(Contains.IN)) {
-                    builder.append("IN [");
-                    for (Object object : (Collection) hasContainer.value) {
-                        builder.append(toStringOfValue(object)).append(",");
-                    }
-                    builder.replace(builder.length() - 1, builder.length(), "").append("]");
-                }
-            }
-
-        }
-        System.out.println(builder);
-        return builder.toString();
-    }
-
-    private String toStringOfValue(final Object value) {
-        if (value instanceof String)
-            return "'" + value + "'";
-        else return value.toString();
-    }*/
 }

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/38a225ed/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
index 2aeab7a..ae83677 100644
--- a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
+++ b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
@@ -228,6 +228,10 @@ public final class Neo4jGraph implements Graph, WrappedGraph<Neo4jGraphAPI> {
         }
     }
 
+    public Neo4jTrait getTrait() {
+        return this.trait;
+    }
+
     @Override
     public <C extends GraphComputer> C compute(final Class<C> graphComputerClass) {
         throw Graph.Exceptions.graphComputerNotSupported();

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/38a225ed/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java
index e61440d..c243957 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/AbstractNeo4jGraphProvider.java
@@ -75,8 +75,7 @@ public abstract class AbstractNeo4jGraphProvider extends AbstractGraphProvider {
 
     private void createIndices(final Neo4jGraph g, final LoadGraphWith.GraphData graphData) {
         final Random random = new Random();
-        final int pick = random.nextInt(3);
-        //final int pick = 2;
+        final int pick = random.nextInt(2);
         if (graphData.equals(LoadGraphWith.GraphData.GRATEFUL)) {
             if (pick == 1) {
                 g.tx().readWrite();
@@ -89,16 +88,7 @@ public abstract class AbstractNeo4jGraphProvider extends AbstractGraphProvider {
                 if (random.nextBoolean())
                     createIndex(g, "CREATE INDEX ON :song(performances)");
                 g.tx().commit();
-            } else if (pick == 2) {
-                g.tx().readWrite();
-                if (random.nextBoolean())
-                    g.getBaseGraph().autoIndexProperties(true, "name");
-                if (random.nextBoolean())
-                    g.getBaseGraph().autoIndexProperties(true, "songType");
-                if (random.nextBoolean())
-                    g.getBaseGraph().autoIndexProperties(true, "performances");
-                g.tx().commit();
-            }
+            } // else no indices
         } else if (graphData.equals(LoadGraphWith.GraphData.MODERN)) {
             if (pick == 1) {
                 g.tx().readWrite();
@@ -112,16 +102,7 @@ public abstract class AbstractNeo4jGraphProvider extends AbstractGraphProvider {
                     createIndex(g, "CREATE INDEX ON :software(lang)");
                 }
                 g.tx().commit();
-            } else if (pick == 2) {
-                g.tx().readWrite();
-                if (random.nextBoolean())
-                    g.getBaseGraph().autoIndexProperties(true, "name");
-                if (random.nextBoolean())
-                    g.getBaseGraph().autoIndexProperties(true, "age");
-                if (random.nextBoolean())
-                    g.getBaseGraph().autoIndexProperties(true, "lang");
-                g.tx().commit();
-            }
+            } // else no indices
         } else if (graphData.equals(LoadGraphWith.GraphData.CLASSIC)) {
             if (pick == 1) {
                 g.tx().readWrite();
@@ -132,16 +113,7 @@ public abstract class AbstractNeo4jGraphProvider extends AbstractGraphProvider {
                 if (random.nextBoolean())
                     createIndex(g, "CREATE INDEX ON :vertex(lang)");
                 g.tx().commit();
-            } else if (pick == 2) {
-                g.tx().readWrite();
-                if (random.nextBoolean())
-                    g.getBaseGraph().autoIndexProperties(true, "name");
-                if (random.nextBoolean())
-                    g.getBaseGraph().autoIndexProperties(true, "age");
-                if (random.nextBoolean())
-                    g.getBaseGraph().autoIndexProperties(true, "lang");
-                g.tx().commit();
-            }
+            } // else no indices
         } else {
             // TODO: add CREW work here.
             // TODO: add meta_property indices when meta_property graph is provided

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/38a225ed/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
----------------------------------------------------------------------
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
index 2971e19..8db88f9 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/structure/NativeNeo4jStructureTest.java
@@ -146,34 +146,6 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
     }
 
     @Test
-    public void shouldReturnResultsUsingLegacyIndexOnVertex() {
-        graph.tx().readWrite();
-        this.getBaseGraph().autoIndexProperties(true, "name");
-        this.graph.tx().commit();
-
-        this.graph.addVertex(T.label, "Person", "name", "marko");
-        this.graph.addVertex(T.label, "Person", "name", "marko");
-        this.graph.tx().commit();
-        assertEquals(2, this.g.V().has("Person", "name", "marko").count().next(), 0);
-        assertEquals(2, this.g.V().has("name", "marko").count().next(), 0);
-    }
-
-    @Test
-    public void shouldUseLegacyIndexOnEdge() {
-        graph.tx().readWrite();
-        this.getBaseGraph().autoIndexProperties(true, "weight");
-        this.graph.tx().commit();
-
-        Vertex marko = this.graph.addVertex(T.label, "Person", "name", "marko");
-        Vertex john = this.graph.addVertex(T.label, "Person", "name", "john");
-        Vertex pete = this.graph.addVertex(T.label, "Person", "name", "pete");
-        marko.addEdge("friend", john, "weight", "a");
-        marko.addEdge("friend", pete, "weight", "a");
-        this.graph.tx().commit();
-        assertEquals(2, this.g.E().has("weight", "a").count().next(), 0);
-    }
-
-    @Test
     public void shouldEnforceUniqueConstraint() {
         this.graph.tx().readWrite();
         this.getBaseGraph().execute("CREATE CONSTRAINT ON (p:Person) assert p.name is unique", null);
@@ -336,24 +308,6 @@ public class NativeNeo4jStructureTest extends AbstractNeo4jGremlinTest {
     }
 
     @Test
-    public void shouldDoLabelAndLegacyIndexSearch() {
-        graph.tx().readWrite();
-
-        this.getBaseGraph().execute("CREATE INDEX ON :Person(name)", null);
-        this.getBaseGraph().autoIndexProperties(true, "name");
-
-        this.graph.tx().commit();
-        this.graph.addVertex(T.label, "Person", "name", "marko");
-        this.graph.addVertex(T.label, "Person", "name", "john");
-        this.graph.addVertex(T.label, "Person", "name", "pete");
-        this.graph.tx().commit();
-        assertEquals(1, this.g.V().has(T.label, "Person").has("name", "marko").count().next(), 0);
-        assertEquals(3, this.g.V().has(T.label, "Person").count().next(), 0);
-        assertEquals(1, this.g.V().has("name", "john").count().next(), 0);
-
-    }
-
-    @Test
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
     public void shouldSupportVertexPropertyToVertexMappingOnIndexCalls() {
         graph.tx().readWrite();