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

Neo4j gem - Querying from an array object

In my previous example I had this query current_user.friends.events(:event, :rel).where("rel.admin = {admin_p} AND event.detail = {detail_p}").params(admin_p: true, detail_p: true).pluck(:event) current_user.friends.events brings me up to events to…
Clam
  • 935
  • 1
  • 12
  • 24
1
vote
1 answer

Neo4j gem - Updating relationship properties method

This is a fairly simple question. Is there a specific method for updating properties for relationships in the gem? I can't seem to do a simple update_attributes or update. My relationship is created and update is undefined for nil class. event =…
Clam
  • 935
  • 1
  • 12
  • 24
1
vote
1 answer

Neo4j gem - Query for specific relationships

There are numerous ways to get a patterns of nodes and relationships and even look up relationships themselves based on relationship properties (e.g. EnrolledIn.where(since: 2002) but what's the best way to do obtain the relationship based on the…
Clam
  • 935
  • 1
  • 12
  • 24
1
vote
1 answer

Neo4J Gem - Saving undeclared relationships

I am trying to create a realtionship between two nodes as described here https://github.com/neo4jrb/neo4j/wiki/Neo4j-v3-Declared-Relationships from_node.create_rel("FRIENDS", to_node) I am getting an undefined method for create_rel What am I doing…
Clam
  • 935
  • 1
  • 12
  • 24
1
vote
1 answer

Associate Neo4j::ActiveNode models with ActiveRecord models

I have an application which uses Neo4j to back-end one model and PostgreSQL to back-end all the other models. Here is the Neo4j model: class Concept include Neo4j::ActiveNode property :name def references Reference.where(concept_uuid:…
1
vote
1 answer

neo4j.rb: How can I implement text searches using neo4j.rb?

I am using neo4j.rb as the ORM for a Rails app, talking to a simple neo4j schema. I have a bunch of Person nodes and each node has two fields name and bio. My goal is to be able to (a) search for people using a fuzzy name search which is case…
Jake
  • 15,007
  • 22
  • 70
  • 86
1
vote
1 answer

Neo4J gem datetime datatype

I'm using a combination of code from http://railscasts.com/episodes/360-facebook-authentication?view=asciicast oauth portion and trying to integrate it with neo4J https://github.com/neo4jrb/neo4j As far as I know this gem replaces many active record…
Clam
  • 935
  • 1
  • 12
  • 24
1
vote
1 answer

Relationship and setter method

I'm trying to override a setter method of one declared relationship to perform a custom behavior and some validation on the old node and the new node. For example, take the next example: class FantasticTeam include Neo4j::ActiveNode has_one…
tehAnswer
  • 960
  • 1
  • 13
  • 28
0
votes
1 answer

Neo4j Cypher query (ActiveGraph)

I have the following Cypher query which I can run in a browser console to produce the desired result: MATCH (start:`Neo4j::Record` {record_id: 1547}), (end:`Neo4j::Record` {record_id: 1850}) MATCH…
knirirr
  • 1,860
  • 4
  • 23
  • 37
0
votes
1 answer

How can I configure Rails with Neo4j in an existing repo?

I'm currently trying to re-configure my database to use Neo4j as opposed to Postgres and I'm having issues with configuration. I've adding the neo4j gem into my gemfile as well as neo4j-core, neo4j-ruby-driver, and neo4j-rake_tasks. I've tried…
0
votes
1 answer

How do we pass the arguments for the relationship properties in neo4j.rb?

Neo4j.rb project. From the docs. student = Student.first lesson = Lesson.new student.lessons << lesson How do we pass the arguments for the relationship properties for the relationship between student and lesson?
Sanjay Singh
  • 367
  • 1
  • 11
0
votes
1 answer

Having trouble setting up neo4j.rb for rails

I am trying to use neo4j.rb on rails. Following https://neo4jrb.readthedocs.io/en/v9.4.0/Setup.html this site, I tried rails new myapp -m http://neo4jrb.io/neo4j/neo4j.rb -O this shows an error that says `open_http': 404 Not Found…
0
votes
1 answer

How to dump data with Neo4j.rb

I'm working on Rails project with Neo4j.rb and I have a very basic problem: I'd like to dump my data to file (and next load it back). Unfortunately I can't do this. I tried this command: neo4j-admin dump --database=
Karol Selak
  • 4,248
  • 6
  • 35
  • 65
0
votes
0 answers

Shortests weighted path with Neo4j.rb and Ruby On Rails

I am trying to calculate the shortest weighted path between two nodes. Here's my User class: class User include Neo4j::ActiveNode property :name, type: String has_many :both, :friends, rel_class: :Friendship, model_class: :User end Users are…
Ibrah
  • 83
  • 9
0
votes
2 answers

Option 'rel_length ' in Neo4j.rb doesn't work properly

It's issue similar to this question , but in my case 'neo4j-core' gem version is updated from 7.0.4 to 8.1.0, and 'neo4j' 8.0.7 -> 8.3.4 class Person include Neo4j::ActiveNode has_one :out, :ancestor, rel_class: :HasFather end class HasFather …
balyam
  • 1
  • 2