Neo4j的版本:3.2.2getDegree()/ isOutgoing()funcitons不graphAware工作/ Neo4j的对elasticsearch mapping.json
操作系统:Ubuntu的16.04
我用getDegree()
功能mapping.json文件,但返回将始终为null
;我正在使用数据集neo4j tutorial Movie/Actor数据集。
Output from elasticsearch request
mapping.json
{
"defaults": {
"key_property": "uuid",
"nodes_index": "default-index-node",
"relationships_index": "default-index-relationship",
"include_remaining_properties": true
},
"node_mappings": [
{
"condition": "hasLabel('Person')",
"type": "getLabels()",
"properties": {
"getDegree": "getDegree()",
"getDegree(type)": "getDegree('ACTED_IN')",
"getDegree(direction)": "getGegree('OUTGOING')",
"getDegree('type', 'direction')": "getDegree('ACTED_IN', 'OUTGOING')",
"getDegree-degree": "degree"
}
}
],
"relationship_mappings": [
{
"condition": "allRelationships()",
"type": "type",
}
]
}
另外,如果我在relationship_mappings属性部分使用isOutgoing(), isIncoming(), otherNode
功能,elasticsearch绝不会从Neo4j的加载关系的数据。我想我大概有这句话only when one of the participating nodes "looking" at the relationship is provided
的一些误解,这个页面https://github.com/graphaware/neo4j-framework/tree/master/common#inclusion-policies上
mapping.json
{
"defaults": {
"key_property": "uuid",
"nodes_index": "default-index-node",
"relationships_index": "default-index-relationship",
"include_remaining_properties": true
},
"node_mappings": [
{
"condition": "allNodes()",
"type": "getLabels()"
}
],
"relationship_mappings": [
{
"condition": "allRelationships()",
"type": "type",
"properties": {
"isOutgoing": "isOutgoing()",
"isIncomming": "isIncomming()",
"otherNode": "otherNode"
}
}
]
}
BTW,有没有列出所有我们能在mapping.json使用功能的任何页面?我知道他们两个
github.com/graphaware/neo4j-framework/tree/master/common#inclusion-policies
github.com/graphaware/neo4j-to-elasticsearch/blob/master/docs/json-mapper.md
但似乎还有更多的,因为我可以用getType()
,这已经不是上述任何网页已经上市。
请让我知道如果我能提供任何进一步的帮助来解决问题
谢谢!
谢谢你的详细解答,Christophe!还有一个问题,只有当一个参与节点“在提供关系时才提供”,意思是在https://github.com/graphaware/neo4j-framework/tree/master/common#inclusion-policies中是什么意思?我想用isIncoming()/ isOutgoing()函数关系,我该如何提供'看着“关系的节点” –
我更新了答案 –
谢谢!现在我明白了 –