FalkorDB / FalkorDB

A super fast Graph Database uses GraphBLAS under the hood for its sparse adjacency matrix graph representation. Our goal is to provide the best Knowledge Graph for LLM (GraphRAG).
https://www.falkordb.com/
Other
698 stars 27 forks source link

Nested JSON on nodes? #8

Open flowt-au opened 1 year ago

flowt-au commented 1 year ago

Hi. I intend to implement FalkorDB as a replacement for RedisGraph as soon as I get through my current backlog! ;-)

I know RedisGraph doesn't support nested json objects on graph nodes because Cypher doesn't support it (as I understand).

I am in the process of working up a way to use RedisJson (which of course does support nested json) in conjunction with RedisGraph / FalkorDB. I am just wondering if nested json objects on graph nodes is something you are considering. I presume not (in order to maintain the Cypher standard) but just thought I would ask. And maybe my assumptions are not correct. ;-)

Thanks for your work. Murray

swilly22 commented 1 year ago

Hi @flowt-au thank you for opening an issue.

Indeed the decision against allowing nested Map objects as attribute values was for compatibility reasons, but let us reconsider, I'll update on our decision.

flowt-au commented 1 year ago

Thanks! I have coded up a solution that takes the nested objects (in my case a map of arrays) and for each key in the map makes a "sub node" of the node owning the map. It seems to be a good solution but being able to nest the map on the node would be a lot simpler and cleaner. I can imagine circumstances where the "sub node" approach might work better but it would be great to have that flexibility. There is probably a lot more to this than my inexpert opinion! ;-) Cheers, Murray

flowt-au commented 1 year ago

One other requirement I have that might be pushing the envelope way too far is that I need to be able to search the items in the nested map of arrays so I can get a list of nodes having specific items in the map.

By making the map items into sub nodes of the owning node I can use Cypher to do the searching. Perhaps that wouldn't be possible with a nested map. I don't know enough here. :-)