How are Python Dictionaries indexed in neo4j

250 Views Asked by At

Bulbflow provides a property class Dictionary to store dictionaries in a neo4j database. How are these indexed? Can I query it for values in the dictionary?

1

There are 1 best solutions below

0
espeed On

Neo4j does not support dicts/maps, only primitives and primitive arrays. For Neo4j, you can use the Bulbs Document Property to have the Python dict converted and stored in Neo4j as a JSON string , and Bulbs will automatically convert it back into a Python dict when you retrieve it. It will be indexed as a string in Neo4j.

See https://github.com/espeed/bulbs/blob/master/bulbs/property.py#L456