Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Neo4j桌面和Enterprise之间的不同结果集_Neo4j_Neo4jclient - Fatal编程技术网

Neo4j桌面和Enterprise之间的不同结果集

Neo4j桌面和Enterprise之间的不同结果集,neo4j,neo4jclient,Neo4j,Neo4jclient,我遇到了一个奇怪的问题。我最初使用桌面版和.Net核心Web API开发了数据库和API。我编写了一个搜索查询,根据相互关系查找节点: var results = _client.Cypher .Match("(n:Person {userId: {userId}})-[]->(ct:ConnectionType)<-[]-(other:Person)") .Where("ct.key IN {ctQuery}") .WithParams(new { searchDto.us

我遇到了一个奇怪的问题。我最初使用桌面版和.Net核心Web API开发了数据库和API。我编写了一个搜索查询,根据相互关系查找节点:

var results = _client.Cypher
.Match("(n:Person {userId: {userId}})-[]->(ct:ConnectionType)<-[]-(other:Person)")
.Where("ct.key IN {ctQuery}")
.WithParams(new
{
    searchDto.userId,
    ctQuery = searchDto.connectionType
})
.ReturnDistinct((other) => new
{
    Profile = other.As<SearchResultsDto>()
}).Results;

在当地工作时,一切都很顺利。但是,当我将API和数据库传输到linux服务器时,返回了一个空结果

这个问题似乎与我使用的数据类型有关。连接节点的键属性是整数。ctQuery对象是一个int[]。在桌面上,一切正常。我打开浏览器并使用相同的查询,但在连接到企业服务器时仍然没有得到任何结果。当连接到桌面数据库时,我得到了结果

如果我将int[]更改为string[],则可以得到结果

企业中是否有防止查询int数组的设置?若然,可否更改?
我有很多查询将使用该键,我不希望经常将字符串转换为int,然后再转换回来。

没有您描述的设置

在Enterprise Server中加载数据时,您可能错过了字符串到整数的转换

可以运行查询将ConnectionType键的所有字符串值转换为整数


这就是问题所在!我打开了用apoc创建的graphml文件,没有显示属性是int还是string。我猜apoc只是将所有内容作为字符串导入。现在我需要检查我的节点并修复所有节点:谢谢!对,apoc将所有内容作为字符串导入,除非指定。
MATCH (n:ConnectionType)
SET n.key= toInt(n.key)