Announcement Announcement Module
No announcement yet.
@Indexed Numeric values in Cypher queries not working Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • @Indexed Numeric values in Cypher queries not working

    Hi all,

    does a working example exist where a @Indexed Integer or Long can be successfully found via a repository based Cypher query?

    I simply can't get this to work, see also

    which seems to be the same problem but is unanswered and

  • #2
    I followed up with the second thread you mentioned - the first went through the gaps .

    You are right, this is a cypher issue, if you can pass in a NumericRangeQuery for now.

    We're working on the issue anyway, but don't know if we can make a new Neo4j (and Cypher) release just for that.

            final String queryString = "start person=node:Person({age}) return";
            final NumericRangeQuery<Integer> rangeQuery = NumericRangeQuery.newIntRange("age", michael.getAge(), michael.getAge(), true, true);
            final Map<String, Object> result = queryEngine.query(queryString, map("age", rangeQuery)).singleOrNull();
            assertNotNull("result is null",result);
            assertEquals("found correct person", michael.getName(), result.get(""));