<p dir="auto"><strong>Neo4j Version:</strong> 2.3.1<br>
<strong>Operating System:</strong> Ubuntu 14.10</p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">Creating a collection of collections, e.g.</p>
<p dir="auto"><code class="notranslate">Collect([TOINT(idn),STR(name),TOINT(status),TOINT(days_norm),TOINT(days_spent)]) as flowsteps</code></p>
<p dir="auto">and later on adding up corresponding items</p>
<p dir="auto"><code class="notranslate">REDUCE (x=0, i IN flowsteps | x + TOINT(STRING(i[3]))) as normP</code></p>
<p dir="auto">throws an error</p>
<p dir="auto"><code class="notranslate">Cypher error: Type mismatch: expected Float, Integer or String but was Any (line 33, column 57 (offset: 1271)) " REDUCE (x=0, i IN flowsteps | x + TOINT(TOSTRING(i[3]))) as normP</code></p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">If I cast something WITH TOINT(), then this should work:</p>
<p dir="auto"><code class="notranslate">REDUCE (x=0, i IN flowsteps | x + i[3]) as normP</code></p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Only works with a workaround  by TOINT(STR()), which is no longer works in 3.0, because STR() is no longer available.</p>
<p dir="auto">Hi,</p>
<p dir="auto">We coding a program for make an import of our sql database to neo4j. We use HTTP API and CSV import query for import all datas</p>
<p dir="auto">We have no probleme with MERGE on nodes but with MERGE on relationships take very very long time (take 15min just for MERGE 10 000 relations ...). We replaced it by CREATE command and it's really better faster but it's a problem because all relationships are duplicate ... and clear all of them with this command crash the server</p>
<p dir="auto">MATCH (s:Ticket)-[r:AskOn]-(t:Project)<br>
WITH s, t, TAIL (COLLECT (r)) as rr<br>
FOREACH (r IN rr | DELETE r)</p>
<p dir="auto">And more database is big and more time MERGE command take<br>
We have lots of data, few millions of relationship and nodes</p>
<p dir="auto">So what your recommandations ? We love neo4j but it's a real problem for us and we can't wait so much time to set up to date our neo4j database</p>
<p dir="auto">We also coded 3 process :</p>
<ul dir="auto">
<li>One for up to date neo database everytime that we have change in our sql database, but some time we have problem and some data missing ...</li>
<li>On for set up first time all data from sql database to neo database, and it's very very slow, we still not succeed to insert all data :(</li>
<li>On for set up to date the last week data of sql database to neo4j</li>
</ul>
<p dir="auto">Thanks you for your helps ans recommandations</p>