Questions tagged [neo4j.rb]

Neo4j.rb is an Active Model compliant Ruby/JRuby wrapper for the Neo4j graph database. It uses the neo4j-core and active_attr gems.

Neo4j.rb is an Active Model compliant Ruby/JRuby wrapper for the Neo4j graph database.

https://github.com/neo4jrb/neo4j

175 questions
1
vote
2 answers

Neo4j gem undefined method `name' for CypherNode

I'm currently experiencing an issue where it looks like CypherNodes aren't being converted into their corresponding model objects properly. Interestingly enough, if I clear my DB locally, the error stops occurring, but will sure enough occur…
Louis Sayers
  • 2,162
  • 3
  • 30
  • 53
1
vote
3 answers

Neo4j.rb - NameError: undefined local variable or method when using where

I am trying to retrieve all BISAC nodes having the word "Art" in the description. ba = Bisac.where(bisac_value =~ '.*Art.*') NameError: undefined local variable or method `bisac_value' for main:Object The equivalent cypher query retrieves 10…
LDB
  • 692
  • 6
  • 18
1
vote
2 answers

Neo4j.rb - undefined local variable or method `model' for #

Here is my controller: def index if params[:limit] @bisacs = Bisac.order(:bisac_code).page(params[:page]).per(params[:limit]) else @bisacs = Bisac.order(:bisac_code).page(params[:page]) end end Here is my view: <%=…
LDB
  • 692
  • 6
  • 18
1
vote
1 answer

Neo4j.rb - Can't use order by

I have 3983 nodes of BISAC type. I cannot retrieve them using order by. Here is what is working: irb(main):024:0* bc = Bisac.all => irb(main):025:0> bc.count CYPHER 796ms MATCH (n:`Bisac`) RETURN count(n)…
LDB
  • 692
  • 6
  • 18
1
vote
3 answers

Neo4j - too many connections resets - from Ruby on Rails console

There is one and only one connection and user here. d = l.descriptions.first Language#descriptions 1200270ms MATCH language137, language137-[rel1:`DESCRIBED_IN`]->(result_descriptions:`Description`) WHERE (ID(language137) = {ID_language137}) RETURN…
LDB
  • 692
  • 6
  • 18
1
vote
1 answer

Unable to create relationship with non-persisted nodes. Neo4jRB Gem

I'm trying to create a blog, and associate a comment to a post. The way I'm defining the relations is as follows: #post.rb has_many :in, :comments, origin: :post # 5.03 try sth else #comment.rb has_one :out, :post, type: :comments_on The error…
cndv
  • 507
  • 2
  • 13
  • 26
1
vote
2 answers

Automatic naming of objects based on associations with other models

I have three models "Input", "Mechanism", and "Output". Mechanism 'has_one' :input and 'has_one' :output. I want it make it so that a Mechanism object has the name attribute "The effect of input X on output Y". Here is what I tried: class Mechanism …
Count Zero
  • 630
  • 1
  • 6
  • 15
1
vote
1 answer

Indexing or Labeling is best in Neo4j

I Need to show the latest posts. In future, there will be around billions of posts. So which is the optimized way to show the latest posts list. By storing every post's month as 201506 and indexing it. or By creating label as 201506 .. 201508 and…
Dheena
  • 117
  • 9
1
vote
1 answer

Neo4j performance tuning

I'm new to Neo4j, Currently I'm trying to make dating site as POC. I have 4GB of Input file which is look like bellow format. This contains viewerId(male/female), viewedId which is list of id's they have viewed. Based on this history file, I need…
Karthick S
  • 25
  • 4
1
vote
1 answer

How do I create a Neo4j relationship via the rails console?

I'm currently working through this tutorial and I'm stuck when it comes to creating relationships in the rails console. I've read through the Neo4jrb project documentation and a blog post on jayway.com but still can't figure it out. I've created a…
Chris
  • 51
  • 6
1
vote
1 answer

How do I create multiple weighted edges between nodes

I want to keep all the browse history, To calculate the behaviour among browsing pages. So I designed the following graph to show my idea, As you can see, there are 4 edges between page A and page B, So how could I create the kind of relationships…
newBike
  • 14,385
  • 29
  • 109
  • 192
1
vote
1 answer

Neo4j.rb: autoincrement relationship attribute?

Is it possible to autoincrement an ActiveRel attribute? In contrast to ActiveRecord, it doesn't seem that ActiveNode/ActiveRel support autoincrement attributes out-of-the-box. I considered using before_save to manually generate an id. However, it…
David Chouinard
  • 6,466
  • 8
  • 43
  • 61
1
vote
1 answer

How to specify Node Label in Neo4jrb

I get a trouble about customize node label in Neo4jrb. class Core::Product include Neo4j::ActiveNode id_property :id property :name property :code property :stock_quantity, type: Integer property :sale_price, type: Float property…
Doom
  • 13
  • 2
1
vote
1 answer

Neo4j and Ruby: How can I speed up unit testing?

Am starting to write unit tests along the lines of https://github.com/neo4jrb/neo4j/wiki/How-To-Test One of the approaches there is really slow (10 seconds per test) and the other doesn't delete labels (and probably other things) Can anyone suggest…
Alex Edelstein
  • 518
  • 5
  • 19
1
vote
1 answer

Neo4j gem - Checking each object against a relationship effecient?

Just wanted an opinion on this in terms of design and efficiency. Let's say you have a social network for liking music. If you have query like music.users and out of those users you want to identify your friends. Visually you want to add a feature…
Clam
  • 935
  • 1
  • 12
  • 24