I think this might be related in optional matches not having deterministic behavior, so the decision in which order to traverse the path and when something is treated as optional is non-deterministic.
In Neo4j 2.0 this was changed to have an explicit OPTIONAL MATCH which is like an outer join in SQL. What is it you actually want to achieve? Can you share your graph model and explain what you want to query for in a better way? Perhaps as a graph-gist ? (gist.neo4j.org) Michael Am 29.04.2014 um 10:15 schrieb Tamás Bennó <[email protected]>: > Hi, all! > > im developing a text-mining database. MAin entities are CASE (article like > structured text), TAG. TAGs has hierarchy, and synonym relations. > > I have a problem with following query: > > ---------------- > > START > pinned_cases = node({connected_cases}) > MATCH > > (pinned_cases)<- > [?:OCCURS_AS_CONTEXT] > -(c_tags), > > (pinned_cases)<- > [?:OCCURS_AS_CONTEXT] > -(start_tags_synonyms)-[?:IS_SYNONYM]-(c_tags), > > (pinned_cases)<- > [?:OCCURS_AS_CONTEXT] > -(parent_tags)-[?:IS_PARENT_OF|CONSISTS_OF|CONTAINS*1..10]->(c_tags), > > (pinned_cases)<- > [?:OCCURS_AS_CONTEXT] > > -(parent_tags)-[?:IS_PARENT_OF|CONSISTS_OF|CONTAINS*1..10]->(child_tags)-[?:IS_SYNONYM]-(c_tags) > > WITH > DISTINCT c_tags, > pinned_cases > > RETURN pinned_cases.id AS case_id, pinned_cases.name AS name, COLLECT ( > [ ID(c_tags), c_tags.name ] ) AS tag_data; > > -------------- > > I have many other CASE - TAG relation type (OCCURS_AS_CONTEXT), and > each has a different query. > > During query tests is found, that in some cases i get the expected result, > but in som other cases not. But it dosent depends on relation type. After > many tests i restarted neo and the result has changed ... in cases (relation > types) which has worked i got a wrong results, and some prviously bad cases i > have got a good = eypected result. This roles has changed on every restart > with an unchanged database. > > Anybody any idea? > > Version: 1.9.4, running on Ubuntu 12.4 > > Thx Guys > > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
