Logical operators in graph database (neo4j) -
edit: possible duplicate of: neo4j logic gate simulation, how to? i have neo4j database contains options, optionvalues, configurations, products , logicalnodes. in concrete, configuration collection of selected optionvalues, 1 each option. logicalnodes on other hand try link combinations of optionvalues point 1 (or multiple) specific products. here have example: you can see in graph there 3 options, 2 2 optionvalues , 1 1 optionvalue. every optionvalue linked product through 1 or more logicalnodes. logicalnodes can linked 1 , there 3 types of logicalnodes (and, or, not (not shown)). now question, know how products related given configuration, not taking logicalnodes account, using cypher: match p = (:configuration {id:"conf1id"})-[r1*]->(pi:productinstance) return pi however, fail come query uses logicalnodes filter out invalid paths. invalid (sub)path when: a logicalnode type equals "and" has more incoming :has_logic relations there in path. a ...