Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.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 如何定义graphML格式的索引?_Neo4j_Gremlin_Graphml - Fatal编程技术网

Neo4j 如何定义graphML格式的索引?

Neo4j 如何定义graphML格式的索引?,neo4j,gremlin,graphml,Neo4j,Gremlin,Graphml,我将数据导出为graphML格式,并希望通过gremlin的graphML.import()函数将其导入neo4j。我需要创建索引来索引所有导入的数据。甚至可以用graphML格式吗 我的导出xml如下所示: <graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocat

我将数据导出为graphML格式,并希望通过gremlin的graphML.import()函数将其导入neo4j。我需要创建索引来索引所有导入的数据。甚至可以用graphML格式吗

我的导出xml如下所示:

<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
        http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">

<key id="user" for="node" attr.name="user" attr.type="int" />
<key id="item" for="node" attr.name="item" attr.type="int" />
<graph id="G" edgedefault="directed">
....
</graph>
</graphml>

....
否,
Gramml不包含此项。您可以在开始导入之前对所需字段启用自动索引,以便它们记录您的更改

是的,我在考虑自动索引,但我的观点是,无需额外设置,就可以轻松地导出/导入数据。但是谢谢,至少我不会再花时间和graphML在一起了。