Showing results for 
Search instead for 
Did you mean: 

Segregate and filter shapes


Hi everybody

What would be the best way to both segregate and filter shapes.

As an example: We have shapes ( circle, triangle, square ) with different colors and sizes.

We want to:
First - Segregate them by shape, color or size or a combination of them (size,color), (shape, color) ,etc.

So we get one node per segragated group with a value indicating how many are part of this group.

Second - Filter the yellow only or the blue and big ones or circle etc.
So the value in the node for each group represent this segregation and filtering

In the real problem that I have, there are up to 10 cathegories and up to 5000 values for each of these cathegories. One or two cathegories might have up to 100 000 values.

An other level to this problem, it's to have a count of persons who like a node ( group as described above ) knowning that a person can like multiple group

Anyway, this is a big problem regarding much more than shapes in many industries



Hello @tard_gabriel 😊

Are you looking for a graph data model?


That would be a start, but I didn't see anything like that on graphgist

You can create a node for each Shape, Color and Size. Then you create Object nodes that will be linked to the according Shape, Color and Size. Like this you will be able to filter easily just be reading relationships.

Could you draw an example with, I tried this approach once and it was qualified as a naive approach but in the end didn't work as expected with large data.

I don't get what's the role of your objects in your example if you create one node for each shape, color, etc.


I was thinking about something like this:



Nodes 2022
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online