Announcement Announcement Module
No announcement yet.
SDN Numeric indexes do not seem to work Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • SDN Numeric indexes do not seem to work

    I am creating nodes with indexes as follows but does not seem to return anything when I perform the cypher queries using this index.
    public class Task {

    private int metricId;
    private String name;
    cypher> start t = (Task, "metricId:[90017008 TO 90017008]") return t
    ==> +---+
    ==> | t |
    ==> +---+
    ==> +---+
    ==> 0 rows, 0 ms

    However when I perform start t = (Task, "metricId:*") return t this node is in the returned nodes list at the bottom.
    ==> | Node[7712]{metricId->90017008,name->"MR_REPORTS",description->"A report with patient data accessed. ",__type__->"com.mercy.bpo.domain.Task"} |
    ==> ------------------------------------------------------------------------------------------------------------------------------------------+
    ==> 2987 rows, 912 ms

    Interestingly, start t = (Task, "metricId:9*") return t does not return anything either. Neither does start t = (Task , metricId, "90017008") or start t = (Task, "metricId:90017008") return any nodes.

  • #2
    You are right, this is an cypher issue, sorry missed this Thread

    If you can pass in a NumericRangeQuery meanwhile that should work
            final String queryString = "start person=node:Person({age}) return";
            final NumericRangeQuery<Integer> rangeQuery = NumericRangeQuery.newIntRange("age", michael.getAge(), michael.getAge(), true, true);
            System.out.println("rangeQuery = " + rangeQuery.toString());
            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(""));