3

我正在尝试使用脚本将批量数据插入 Neo4j。一段时间后,脚本因以下异常而中断。

PHP Fatal error:  Uncaught exception 'Everyman\Neo4j\Exception' with message 'Unable to execute query [400]:
Headers: Array
(
    [Content-Length] =>  3031
    [Content-Type] =>  application/json; charset=UTF-8
    [Access-Control-Allow-Origin] =>  *
    [Server] =>  Jetty(6.1.25)
)
Body: Array
(
    [message] => An identifier is used with different types. The identifier `  UNNAMED2` is used both as Relationship and as Collection
    [exception] => CypherTypeException
    [fullname] => org.neo4j.cypher.CypherTypeException
    [stacktrace] => Array
        (
            [0] => org.neo4j.cypher.internal.symbols.SymbolTable.add(SymbolTable.scala:33)
            [1] => org.neo4j.cypher.internal.symbols.SymbolTable$$anonfun$checkNoOverlapsExist$1.apply(SymbolTable.scala:47)
            [2] => org.neo4j.cypher.internal.symbols.SymbolTable$$anonfun$checkNoOverlapsExist$1.apply(SymbolTable.scala:46)
            [3] => scala.collection.immutable.Map$Map1.foreach(Map.scala:109)
            [4] => org.neo4j.cypher.internal.symbols.Symbol in phar:///var/www/zomato9/application/library/neo4jphp.phar/lib/Everyman/Neo4j/Command.php on line 116

相同的查询从控制台工作,并从发生异常的同一点重新启动脚本再次工作一段时间,直到它再次失败。捕获异常并使脚本休眠几秒钟不会破坏脚本。

关于这里可能发生的事情有什么建议吗?

更新:添加了一个示例查询

START a = node:?("?:?"), b = node:?("?:?")
            MATCH a-[c1:ACTIVITY_LIST*]->z, z-[r1:ACTIVITY_LIST]->y
            WHERE z.TIMESTAMP >= '.$time.' AND y.TIMESTAMP < '.$time.'
            CREATE n = {?}, clist = {COMMENT_ID: ''}, a-[:IN_?]->n, n-[:OUT_?]->b, n-[:COMMENT_LIST]->clist, z-[:ACTIVITY_LIST]->n, n-[:ACTIVITY_LIST]->y
            DELETE r1
            RETURN n;
4

0 回答 0