Skip to content

Support for point() type and function #111

@owentechnologist

Description

@owentechnologist

It appears that the java graph library ( com.redislabs.redisgraph.impl.api.RedisGraph ) cannot handle point() types.

Query: match (s:Shopper {id: 3}) return s graph: recommendations
Records returned from query: match (s:Shopper {id: 3}) return s
[Record] Key: s Value: Node{labels=[Shopper], id=4002, propertyMap={country=Property{name='country', value=Canada}, name=Property{name='name', value=David Rugrat}, id=Property{name='id', value=3}}}
Query: match (s:Shopper {id: 1}) return s graph: recommendations

Exception in thread "main" com.redislabs.redisgraph.exceptions.JRedisGraphCompileTimeException: redis.clients.jedis.exceptions.JedisDataException: Unrecognized response type
	at com.redislabs.redisgraph.impl.api.ContextedRedisGraph.sendQuery(ContextedRedisGraph.java:59)
	at com.redislabs.redisgraph.impl.api.RedisGraph.sendQuery(RedisGraph.java:68)
	at com.redislabs.redisgraph.impl.api.AbstractRedisGraph.query(AbstractRedisGraph.java:37)

redis-cli handles the point type:

127.0.0.1:10005> GRAPH.QUERY "recommendations" "match (s:Shopper {id: 3}) return s"
1) 1) "s"
2) 1) 1) 1) 1) "id"
            2) (integer) 4002
         2) 1) "labels"
            2) 1) "Shopper"
         3) 1) "properties"
            2) 1) 1) "id"
                  2) (integer) 3
               2) 1) "name"
                  2) "David Rugrat"
               3) 1) "country"
                  2) "Canada"
3) 1) "Cached execution: 1"
   2) "Query internal execution time: 0.202800 milliseconds"
127.0.0.1:10005> GRAPH.QUERY "recommendations" "match (s:Shopper {id: 1}) return s"
1) 1) "s"
2) 1) 1) 1) 1) "id"
            2) (integer) 4000
         2) 1) "labels"
            2) 1) "Shopper"
         3) 1) "properties"
            2) 1) 1) "id"
                  2) (integer) 1
               2) 1) "name"
                  2) "David Hoppytail"
               3) 1) "country"
                  2) "Canada"
               4) 1) "geo_point"
                  2) "point({latitude:51.964802, longitude:-88.150902})"
3) 1) "Cached execution: 1"
   2) "Query internal execution time: 0.185100 milliseconds"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions