2
我試圖將我的Neo4J應用程序移植到Titan,並且我遇到了一些與索引有關的問題。 我知道泰坦不支持頂點或邊緣索引,只有「關鍵」索引,是不是?燈泡/ Gremlin/Titan的關鍵指標
我還與燈泡型號工作,例如:
gremlin> g.getVertices('facebook_id', '111')
一點也沒有:
class Person(Node):
element_type = 'person'
facebook_id = String(indexed=True)
加人(facebook_id = '111')來檢索使用時,它應該是可能的沒有用,並告訴我需要在使用它之前創建密鑰索引。所以我放棄了密鑰空間和手動創建在rexster狗窩指數:鱗莖
gremlin> g.createKeyIndex("facebook_id", Vertex.class);
之後,創建人(facebook_id =「111」),並試圖檢索rexster狗窩:
gremlin> g.getVertices("facebook_id", "111")
並得到空的迴應。當使用泰坦頂點ID它的工作原理,但「facebook_id」自帶空和「.MAP()」抓取,不能正常工作:
gremlin> g.v(4)
==>v[4]
gremlin> g.v(4).name
==>Renato Garcia Pedigoni
gremlin> g.v(4).facebook_id # nothing returned!
gremlin> g.v(4).map()
==>javax.script.ScriptException: java.lang.IllegalArgumentException: The value is already used by another vertex and the key is unique
PS
- 這是我落下後創建的第一個頂點keyspace
- 是否可以自動創建密鑰索引?
任何提示?
謝謝!
雷納託Pedigoni