Announcement Announcement Module
Collapse
No announcement yet.
@Indexed Numeric values in Cypher queries not working Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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

    http://forum.springsource.org/showth...t-seem-to-work

    which seems to be the same problem but is unanswered and

    http://forum.springsource.org/showth...361#post388361

  • #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.

    Code:
            final String queryString = "start person=node:Person({age}) return person.name";
            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("person.name"));

    Comment

    Working...
    X