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()函數關係,我該如何提供'看着「關係的節點」 –
我更新了答案 –
謝謝!現在我明白了 –