Using neo4j via py2neo. I need to be able to query using CYPHER for numeric values, using an index. For example, START n=node:field_index("subdomain:Football AND type:Competition AND weight>10") RETURN n;
Weight should be indexed as a numeric field in lucene. This query results in
org.neo4j.server.rest.repr.RepresentationExceptionHandlingIterable.exceptionOnHasNext(Repres
even though the index is created and the nodes added. The index i create using
node_index=g.get_or_create_index(neo4j.Node, "field_index")
adding the nodes using
batch = neo4j.WriteBatch(g) for node in nodes: batch.add_to_index(neo4j.Node,"field_index","type",node["type"],node) batch.submit()
How do i indicate that the value of node["type"] is numeric through py2neo? How do i then query for it using CYPHER?
Alternatively, if someone can indicate how else i could create a numeric index using possibly the console that would be appreciated.