2014-09-21 19 views
1

爲什麼Spring Data Neo4j 3.1.x中的NamedIndexRepository被刪除?有什麼辦法創造__types__索引創建CYPHER這樣的查詢:SDN:Spring數據neo4j中__types__的替換是什麼3.1.4

Start root=node:__types__(className="a.b.c.XYZ") return root 

好像它不再在新的SDN支持。任何其他方面來實現這一目標?

更新
link顯示,我們可以選擇使用傳統的索引策略。謝謝stefan和tstorm。現在又出現了問題,如果不使用典型的__types__(className=""),那麼會出現任何性能問題,如果我使用這樣的話:Start root=node(*)....

+1

您可能會從我關於SDN 3遷移的博客文章中受益:http://javaprogress.wordpress.com/2014/05/16/migrating-to-spring-data-neo4j-3-0/ – tstorms 2014-09-22 08:47:03

+0

謝謝@tstorms :)幫助我。 TypeRepresentationStrategyFactory是解決方案。我也發現了這個http://comments.gmane.org/gmane.comp.db.neo4j.user/19065,後面跟着這個http://docs.spring.io/spring-data/data-neo4j/docs/ 3.2.0.RELEASE/reference/html /#reference_programming-model_typerepresentationstrategy – agpt 2014-09-22 10:14:11

回答

0

Neo4j在2.0中添加了標籤的概念。標籤是分組某些節點的推薦方式,也就是具有相同類別的節點。詳情請參閱http://neo4j.com/blog/spring-data-neo4j-progress-update-sdn-3-neo4j-2/的博客文章。

+0

謝謝。我已經看到了這一點,但沒有清楚地看到實施或使用情況。你能否詳細說明一下? – agpt 2014-09-21 16:13:05

+0

你看過https://github.com/spring-projects/spring-data-neo4j/tree/master/spring-data-neo4j-examples中的例子嗎? – 2014-09-22 06:22:30

相關問題