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
1 answer

includeStats in neo4j.rb

I'm using neo4j.rb, and when I run MATCH (a {name:'apple'}) SET a.flag = true I'd like to get the response data, which would be along the lines of: { "results": [ { "columns": [], "data": [], "stats": { …
stephen
  • 195
  • 9
1
vote
1 answer

Getting Parent Nodes in Without Explicitly Declaring a Relationship

Using Neo4j/Ruby, I would like to get the parent nodes of a node. // i can get the children node, but is there any way to access the parent nodes" // @decision.next.each.map{|r|...} // like: // @decision.parents... class Decision include…
meow
  • 27,476
  • 33
  • 116
  • 177
1
vote
1 answer

Don't want to display neo4j relations in a form

I'm using neo4j in my current app and it is my first time with this database, then I have a lot of doubts. The most important now is the following. I'm customizing my input forms (as you may see in this question I asked) and here is one of my…
Ed de Almeida
  • 3,675
  • 4
  • 25
  • 57
1
vote
1 answer

Neo4jrb Rails Project: Passing Through an Indefinite Number of Parameters to Generate Relationships

I am working on a neo4j rails project that involves a parent-child type relationship between nodes from the same model. Any child can have multiple parents. I would like to be able to create the parent-child relationships when I create a new child.…
1
vote
2 answers

How to visualise the relationship between two nodes in Neo4j using d3.js?

I've wrote a cypher query to show the relationship between two movie nodes: MATCH (m1:Movie)-[r*1..2]-(m2:Movie) where m1.movieID = '1' AND m2.movieID = '2' RETURN r LIMIT 25 It's returns this in the Neo4j browser, and this is exactly what I want…
f7n
  • 1,476
  • 3
  • 22
  • 42
1
vote
2 answers

from Neo4j to GraphJSON with Ruby

I'm trying to get visualizations using d3.js or alchemy.js--but alchemy, in particular, requires the datasource to be in GraphJSON. I've been playing around with the tutorials and examples of Max De Marzi (using neography), Michael Hunger (cy2neo,…
stephen
  • 195
  • 9
1
vote
1 answer

Method "rel_length" in Neo4j.rb doesn't work.

I need to get "friends of friends" of User. So, friend(rel_length: 2) doesn't work (ignores method), returning friends. class User include Neo4j::ActiveNode ... has_many :out, :friend, rel_class: Friend ... end class Friend include…
Dan Mukh
  • 35
  • 4
1
vote
1 answer

Logstash Custom Plugin - Unable to create session to Neo4j within Logstash

I am having issues with a custom plugin and not exactly where to turn. I am building a custom Logstash output plugin to build our Neo4j models. Running the code externally with jruby included with Logstash, I have no issues creating a session to our…
1
vote
1 answer

Setup neo4j and Rails 3.2 with Ruby MRI

I want to try using neo4j with Rails 3.2 app which is using Ruby MRI. In this setup doc, bundling the app requires ActiveSupport 4, so, the question is whether it's possible to use the current setup (ActiveSupport 3.2.x) without using JRuby. The…
Roy Zinn
  • 27
  • 1
  • 7
1
vote
1 answer

Neo4j and Rails don't give me a model

I'm using neo4j with neo4jrb. In irb I use this query: p = Tag.as(:t).where("t.value = 'Andre'").names(:n).pluck(:n) I expect to get with p.first a model from type Person. But as result I get only a CypherNode 3 (53012760). The 3 is the ID from the…
Andre
  • 385
  • 1
  • 13
1
vote
1 answer

Neo4j time series aggregation query

I have a year, month, day, hour, minute graph similar to http://neo4j.com/docs/1.9.4/cypher-cookbook-path-tree.html, where a minute may have 0 or more events happen, and an event can only occur once. I want to be able to build a query to match for…
user1012802
  • 123
  • 1
  • 2
  • 6
1
vote
1 answer

Neo4j rb inheritance

I am using Neo4j.rb in my rails app. I am having trouble with polymorphism. I have something like this I have a Users class which looks like this: class User include Neo4j::ActiveNode #other properties has_many: out, :social_media_content,…
Artemis Fowl
  • 301
  • 1
  • 10
1
vote
2 answers

"undefined method" error when accessing relationship on ActiveNode defined with has_many

I have this class class RelatedExternalDe include Neo4j::ActiveNode property :eid property :name property :source validates :eid, presence: true has_many :in, :related_data_elements, type: 'related_external_de', model_class:…
1
vote
1 answer

How can I have searchkick autocomplete on multiple fields?

Is it possible to use multiple fields for searchkick's autocomplete feature? It seems to be searching only the first field specified. For example, for a person with the first_name "Foo" and last_name "Bar" Person.search("Fo", fields: [first_name:…
Musannif Zahir
  • 3,001
  • 1
  • 21
  • 31
1
vote
1 answer

How to load neo4j test database with data from fixtures/ yml file?

This is my first time developing in Ruby on Rails, and I am using Neo4j for a database. I have installed a test version, created some models representing nodes, and written a basic test to make sure everything is working. The test is very simple:…