<p dir="auto">I've described the original issue at  <a href="http://stackoverflow.com/questions/25601380/neo4j-merge-with-comma-in-pattern-throws-invalid-syntax-unlike-match-or-crea" rel="nofollow">stackoverflow.com</a>.</p>
<p dir="auto">CREATE and especially MATCH support more or less complex patterns that can't be written without breaking up the pattern into multiple parts, separated by commas. This is due to the one-dimensional nature of a line of text used to describe the pattern in Cypher.</p>
<p dir="auto">For example, in order to get my mom, dad and brother I have to split up the pattern and repeat the node identifier (me):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MATCH (dad)&lt;-[:FATHER]-(me { Name: 'Jan'})-[:MOTHER]-&gt;(mom), (me)-[:BROTHER]-&gt;(brother)
RETURN mom, dad, brother;"><pre class="notranslate"><code class="notranslate">MATCH (dad)&lt;-[:FATHER]-(me { Name: 'Jan'})-[:MOTHER]-&gt;(mom), (me)-[:BROTHER]-&gt;(brother)
RETURN mom, dad, brother;
</code></pre></div>
<p dir="auto">I expected that MERGE would allow for the same syntax, but it does not: it returns an error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Invalid input ',': expected whitespace, a relationship pattern ..."><pre class="notranslate"><code class="notranslate">Invalid input ',': expected whitespace, a relationship pattern ...
</code></pre></div>
<p dir="auto">I can't split up the pattern into multiple MERGEs because that would give different results (either the <em>whole</em> pattern matches or it doesn't).</p>
<p dir="auto">Can this be supported?</p>
<p dir="auto">Thanks,<br>
Jan</p>
<p dir="auto">I am not for certain this is a bug, but looks like so.</p>
<p dir="auto">First add 3 duplicate nodes by<br>
CREATE (:Person {Name:'Peter'})<br>
CREATE (:Person {Name:'Peter'})<br>
CREATE (:Person {Name:'Peter'})</p>
<p dir="auto">Then add another 3 duplicate nodes by<br>
CREATE (:Person {Name:'Tom'})<br>
CREATE (:Person {Name:'Tom'})<br>
CREATE (:Person {Name:'Tom'})</p>
<p dir="auto">Then the following query returns an incorrect result.<br>
MATCH (e1:Person {Name:'Peter'}),(e2:Person {Name:'Tom'}) RETURN count(e1)<br>
The result for count(e1) is 9 instead of 3.</p>
<p dir="auto">If "distinct" keyword is used, the result is correct.<br>
MATCH (e1:Person {Name:'Peter'}),(e2:Person {Name:'Tom'}) RETURN count(distinct e1)<br>
The result for count(distinct e1) is 3.</p>
<p dir="auto">Perhaps I misunderstand the query? But I think 3 is expected for "count(e1)" in this case.</p>