neo4j - NotFoundException merge relationship type for first time -


on fresh db of neo4j (2.0.1) first time run query 400 notfoundexception angry @ 5th relationship. technically these relation types new since it's first query hit db. doesn't break app curious if using bad technique here. have with clause?

// match possible mutual friend pattern "match (user:user {userid:{userid}})-[:friend]-(mutualfriend:user)-[:friend]-(possiblefriend:user) " + "where not (user)-[:friend]-(possiblefriend) " + "and not (user)-[:friend_invitation]-(possiblefriend) " + "with user, possiblefriend, count(mutualfriend) mutuals " + // create suggestion user suggested friend "merge (user)-[suggestion1:friend_suggestion]->(possiblefriend) " + "on create set suggestion1.mutual=mutuals, suggestion1.ignore=false, suggestion1.facebook=false " + "on match set suggestion1.mutual=mutuals " + // create suggestion in opposite direction "merge (user)<-[suggestion2:friend_suggestion]-(possiblefriend) " + "on create set suggestion2.mutual=mutuals, suggestion2.ignore=false, suggestion2.facebook=false " + "on match set suggestion2.mutual=mutuals " + // return total number of suggestions created or updated "return count(suggestion1) + (suggestion1) total"; 

here response neo4j:

{   "message" : "relationship 5 not found",   "exception" : "notfoundexception",   "fullname" : "org.neo4j.graphdb.notfoundexception",   "stacktrace" : [ "org.neo4j.kernel.impl.core.nodemanager.getrelationshipforproxy(nodemanager.java:547)", "org.neo4j.kernel.impl.api.state.oldtxstatebridgeimpl.deleterelationship(oldtxstatebridgeimpl.java:144)", "org.neo4j.kernel.impl.api.state.txstateimpl.relationshipdodelete(txstateimpl.java:264)", "org.neo4j.kernel.impl.api.statehandlingstatementoperations.relationshipdelete(statehandlingstatementoperations.java:104)", "org.neo4j.kernel.impl.api.constraintenforcingentityoperations.relationshipdelete(constraintenforcingentityoperations.java:147)", "org.neo4j.kernel.impl.api.lockingstatementoperations.relationshipdelete(lockingstatementoperations.java:203)", "org.neo4j.kernel.impl.api.operationsfacade.relationshipdelete(operationsfacade.java:443)", "org.neo4j.cypher.internal.spi.v2_0.transactionboundexecutioncontext$relationshipoperations.delete(transactionboundexecutioncontext.scala:171)", "org.neo4j.cypher.internal.spi.v2_0.transactionboundexecutioncontext$relationshipoperations.delete(transactionboundexecutioncontext.scala:169)", "org.neo4j.cypher.internal.compiler.v2_0.spi.delegatingoperations.delete(delegatingquerycontext.scala:92)", "org.neo4j.cypher.internal.compiler.v2_0.spi.exceptiontranslatingquerycontext$exceptiontranslatingoperations.org$neo4j$cypher$internal$compiler$v2_0$spi$exceptiontranslatingquerycontext$exceptiontranslatingoperations$$super$delete(exceptiontranslatingquerycontext.scala:118)", "org.neo4j.cypher.internal.compiler.v2_0.spi.exceptiontranslatingquerycontext$exceptiontranslatingoperations$$anonfun$delete$1.apply$mcv$sp(exceptiontranslatingquerycontext.scala:118)", "org.neo4j.cypher.internal.compiler.v2_0.spi.exceptiontranslatingquerycontext$exceptiontranslatingoperations$$anonfun$delete$1.apply(exceptiontranslatingquerycontext.scala:118)", "org.neo4j.cypher.internal.compiler.v2_0.spi.exceptiontranslatingquerycontext$exceptiontranslatingoperations$$anonfun$delete$1.apply(exceptiontranslatingquerycontext.scala:118)", "org.neo4j.cypher.internal.compiler.v2_0.spi.exceptiontranslatingquerycontext.org$neo4j$cypher$internal$compiler$v2_0$spi$exceptiontranslatingquerycontext$$translateexception(exceptiontranslatingquerycontext.scala:149)", "org.neo4j.cypher.internal.compiler.v2_0.spi.exceptiontranslatingquerycontext$exceptiontranslatingoperations.delete(exceptiontranslatingquerycontext.scala:118)", "org.neo4j.cypher.internal.compiler.v2_0.spi.updatecountingquerycontext$countingops.delete(updatecountingquerycontext.scala:118)", "org.neo4j.cypher.internal.compiler.v2_0.mutation.deleteentityaction.org$neo4j$cypher$internal$compiler$v2_0$mutation$deleteentityaction$$delete(deleteentityaction.scala:53)", "org.neo4j.cypher.internal.compiler.v2_0.mutation.deleteentityaction.exec(deleteentityaction.scala:37)", "org.neo4j.cypher.internal.compiler.v2_0.pipes.executeupdatecommandspipe.org$neo4j$cypher$internal$compiler$v2_0$pipes$executeupdatecommandspipe$$exec(executeupdatecommandspipe.scala:56)", "org.neo4j.cypher.internal.compiler.v2_0.pipes.executeupdatecommandspipe$$anonfun$org$neo4j$cypher$internal$compiler$v2_0$pipes$executeupdatecommandspipe$$executemutationcommands$1$$anonfun$apply$2.apply(executeupdatecommandspipe.scala:45)", "org.neo4j.cypher.internal.compiler.v2_0.pipes.executeupdatecommandspipe$$anonfun$org$neo4j$cypher$internal$compiler$v2_0$pipes$executeupdatecommandspipe$$executemutationcommands$1$$anonfun$apply$2.apply(executeupdatecommandspipe.scala:45)", "scala.collection.iterator$$anon$13.hasnext(iterator.scala:371)", "scala.collection.iterator$$anon$13.hasnext(iterator.scala:371)", "org.neo4j.cypher.internal.compiler.v2_0.pipes.emptyresultpipe.internalcreateresults(emptyresultpipe.scala:28)", "org.neo4j.cypher.internal.compiler.v2_0.pipes.pipewithsource.createresults(pipe.scala:71)", "org.neo4j.cypher.internal.compiler.v2_0.executionplan.executionplanbuilder.org$neo4j$cypher$internal$compiler$v2_0$executionplan$executionplanbuilder$$preparestateandresult(executionplanbuilder.scala:149)", "org.neo4j.cypher.internal.compiler.v2_0.executionplan.executionplanbuilder$$anonfun$3.apply(executionplanbuilder.scala:136)", "org.neo4j.cypher.internal.compiler.v2_0.executionplan.executionplanbuilder$$anonfun$3.apply(executionplanbuilder.scala:135)", "org.neo4j.cypher.internal.compiler.v2_0.executionplan.executionplanbuilder$$anon$6.execute(executionplanbuilder.scala:50)", "org.neo4j.cypher.internal.executionplanwrapperforv2_0.execute(cyphercompiler.scala:93)", "org.neo4j.cypher.executionengine.execute(executionengine.scala:61)", "org.neo4j.cypher.executionengine.execute(executionengine.scala:65)", "org.neo4j.cypher.javacompat.executionengine.execute(executionengine.java:78)", "org.neo4j.server.rest.web.cypherservice.cypher(cypherservice.java:100)", "java.lang.reflect.method.invoke(method.java:606)", "org.neo4j.server.rest.transactional.transactionalrequestdispatcher.dispatch(transactionalrequestdispatcher.java:139)", "org.neo4j.server.rest.security.securityfilter.dofilter(securityfilter.java:112)", "java.lang.thread.run(thread.java:744)" ] } 


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -