简体   繁体   English

使用Neography + Heroku的NEO4j中的数组

[英]Arrays in NEO4j using Neography+Heroku

I am running a rake process that imports my data into Neo4j. 我正在运行一个rake进程,将我的数据导入Neo4j。 It's all fine until arrays come up. 直到阵列出现,一切都很好。 Here's a sample: 这是一个示例:

{:spelling=>"the", :letters=>["T","H","E"], :length=>2, :rank=>1, :part_of_speech=>"article"} {:spelling =>“ the”,:letters => [“ T”,“ H”,“ E”],:length => 2,:rank => 1,:part_of_speech =>“ article”}

Here's the ruby code for importing it that fails: 这是导入失败的红宝石代码:

node = @neo.create_unique_node("words", "spelling_phonemes", a[:spelling]+','+a[:phonemes], {"spelling" => a[:spelling], "length" => a[:length], "letters" => a[:letters].split(','), "rank" => a[:rank], "part_of_speech" => a[:part_of_speech]}) node = @ neo.create_unique_node(“ words”,“ spelling_phonemes”,a [:spelling] +','+ a [:phonemes],{“ spelling” => a [:spelling],“ length” => a [ :length],“ letters” => a [:letters] .split(','),“ rank” => a [:rank],“ part_of_speech” => a [:part_of_speech]})

Here's the error: Unknown property type on: [T, H, E], class java.util.ArrayList 错误是:[T,H,E],类java.util.ArrayList上的未知属性类型

It's working fine on locally. 在本地运行正常。 What gives! 是什么赋予了! From reading around, it seems likes ArrayList might be the issue as only type Array works. 通过阅读,似乎ArrayList可能是问题,因为只有Array类型才起作用。 If that's the case, how do I ensure that the ruby array is casted/converted properly as a Java Array ?! 如果是这样,我如何确保将ruby数组正确地转换为Java数组? Thanks! 谢谢!

Also, using neo4j 2.0 locally and Heroku is 1.8.1 I think. 另外,我认为在本地使用neo4j 2.0和Heroku是1.8.1。

1.8.1是古老的版本,可能与任何最近的Neographic版本都不兼容...如果您希望使用最新的远程托管版本(在2.0上),请尝试http://www.graphenedb.com

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM