0
我從http://docs.neo4j.org/chunked/snapshot/rest-api-traverse.html 閱讀維基API,並檢查我的代碼,我可以通過遍歷找到最短的n個路徑,並且可以找到與索引有關的節點或關係。但我的項目有300M節點,當我發現最短的n遍路徑,如retionship數據屬性名稱包含'嗨',如果我使用neo4j的fiter方法,它真的很慢,我想使用索引(我創建它!),代碼像:可以neo4j通過索引找到最短的n個路徑?
{
"order" : "breadth_first",
"return_filter" : {
"body" : "position.endNode().getProperty('name').toLowerCase().contains('t')",
"language" : "javascript"
},
"prune_evaluator" : {
"body" : "position.length() > 10",
"language" : "javascript"
},
"uniqueness" : "node_global",
"relationships" : [ {
"direction" : "all",
"type" : "knows"
}, {
"direction" : "all",
"type" : "loves"
} ],
"max_depth" : 3
}
我想:
{
"order" : "breadth_first",
"return_filter" : {
"body" : "position.endNode().name:*hi*",
"language" : "javascript"
},
"prune_evaluator" : {
"body" : "position.length() > 10",
"language" : "javascript"
},
"uniqueness" : "node_global",
"relationships" : [ {
"direction" : "all",
"type" : "knows"
}, {
"direction" : "all",
"type" : "loves"
} ],
"max_depth" : 3
}
有人可以幫助我嗎?
感謝您的@ user211920,關係有*大數據*像長字符串,長度超過1000,我想用索引搜索查詢由lucene。我第一次不關心,因爲我會加載所有數據在memory.any想法?謝謝 – cjjer 2011-12-14 13:13:34