0
votes

Using the latest Neo4jClient to access a Neo4j DB I can't successfully run the following Cypher query:

            var connections = _graphClient.Cypher
                                .StartWithNodeIndexLookup("n", "indexName", "'id:*'")
                                .Match("c=(n)-[:RELATIONSHIP_TYPE]-()")
                                .Return<MyRelationship>("c")
                                .Skip(5)
                                .Limit(10)
                                .Results;

This returns zero results. However it generates the following query:

START n=node:indexName('id:*') MATCH c=(n)-[:RELATIONSHIP_TYPE]-() RETURN c SKIP 5 LIMIT 10

When I run this directly through Neo4j's admin board I get the correct result set back.

What am I missing? Any help would be appreciated.

1

1 Answers

1
votes

I think it's because of the single quotes you have in your index

var connections = _graphClient.Cypher
     .StartWithNodeIndexLookup("n", "indexName", "id:*") //<-- remove the single quotes
     .Match("c=(n)-[:RELATIONSHIP_TYPE]-()")
     .Return<MyRelationship>("c")
     .Skip(5)
     .Limit(10)
     .Results;

If you have this sort of problem again, the easiest thing to do is switch the StartWithNodeIndexLookup call with just Start and use a known node reference to check where the error could be occurring.