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

Neo4j - unexpected difference in the results returned by cypher and Ruby gem

I have two nodes, User and Thema (this a categorizing standard for books). Here are my classes related to this matter. User: class User include Neo4j::ActiveNode property :name, type: String, constraint: :unique property :created_at, type:…
LDB
  • 692
  • 6
  • 18
2
votes
1 answer

Neo4j rb finding connectivity between 2 nodes

I am using neo4j.rb in my rails application. I already have two nodes n1 and n2 retrieved from the database. Now i need to check if they have a path between them, i was thinking of using cypher queries using Neo4j::Session.query But since i already…
Artemis Fowl
  • 301
  • 1
  • 10
2
votes
2 answers

Searchkick search function not returning any results

I am using Neo4j.rb and searchkick for a ruby on rails app. I have the following class class NeoUser include Neo4j::ActiveNode searchkick property :first_name, type: String property :last_name, type: String property :email, type:…
Artemis Fowl
  • 301
  • 1
  • 10
2
votes
2 answers

How do a general search across string properties in my nodes?

Working with Neo4j in a Rails app. I have nodes with several string properties containing long strings of user generated content. For example in my nodes of type: "Book", I might have properties, "review", and "summary", which would contain…
Count Zero
  • 630
  • 1
  • 6
  • 15
2
votes
2 answers

Neo4j - failed processing and refused new connection

I am running these in an AWS sever 16GB of memory. Using Ruby on Rails gem. d = Description.first CYPHER 14118ms MATCH (n:`Description`) RETURN n ORDER BY n.uuid LIMIT {limit_1} | {:limit_1=>1} Except the long time to return the result, so far, so…
LDB
  • 692
  • 6
  • 18
2
votes
1 answer

Proper way to set up "friends" (bidirectional relationship) in Neo4j.rb

What would be the proper way to create a relationship between Users that have a bidirectional relationship? Say I have: class User include Neo4j::ActiveNode property :name, type: String property :created_at, type: DateTime property…
bswinnerton
  • 4,533
  • 8
  • 41
  • 56
2
votes
1 answer

Neo4jRB: replicating accepts_nested_attributes_for functionality in ActiveNode?

I'd love to be able to use Rails' native form infrastructure for managing nested relationships. The Changelog makes reference to accepts_nested_attributes_for, but it does not seem to work. Can I add properties to ActiveNode that are functions…
David Chouinard
  • 6,466
  • 8
  • 43
  • 61
2
votes
1 answer

Neo4j using params[:search] in controller and like in the model

The line in controller in the index method is: @authors = Author.as(:a).search(params[:search]).paginate(:page => @page, :per_page => @per_page, return: :a, order: :name) Looking to retrieve all authors having a substring part of the name. The…
L.D
  • 1,279
  • 3
  • 15
  • 31
2
votes
1 answer

Neo4j gem - Distinct Query with Paginate

How can I get my plucked array to work with the paginate method (which I believe only works on queryproxy objects) My results are pulling up a few of the same nodes as there are multiple paths to it, so I added pluck and distinct like…
Clam
  • 935
  • 1
  • 12
  • 24
2
votes
1 answer

Ruby on Rails - Neo4J Connection Refused

I am writing a Ruby on Rails application and using a Neo4J database. I'm using the neo4j-core gem in order to integrate the two and I have a problem when connecting to the database. The database is not located at the same server as the application…
Rizkallah
  • 113
  • 6
2
votes
1 answer

Neo4j gem - Querying multiple parameters in one property

I'm not even sure if this title is the best description. I'm building some basic filtering capabilities via a form for my events. Events have a category from a select drop down. Now when you want to filter, you can select via checkboxes the…
Clam
  • 935
  • 1
  • 12
  • 24
2
votes
1 answer

Neo4j gem - Detailed Querying direction with has_many: both

I was able to do a specific pattern match from this original question Neo4j gem - Preferred method to deal with admin relationship via…
Clam
  • 935
  • 1
  • 12
  • 24
2
votes
1 answer

Neo4j gem - Preferred method to deal with admin relationship

This is mostly a design/efficiency question but I wanted to see if there was a preferred way to handle this in neo4j as opposed to how I would do it in a sql db. Right now I have 2 models - user and event. I also have a relationship between user and…
Clam
  • 935
  • 1
  • 12
  • 24
2
votes
1 answer

Neo4J gem associations and creating relationships

This goes back to my issue with this Neo4J Gem - Saving undeclared relationships In the documentation, they give an example of this post.comments = [comment1, comment2] # Removes all existing relationships post.comments << comment3 #…
Clam
  • 935
  • 1
  • 12
  • 24
1
vote
3 answers

Aborting queries on neo4jrb

I am running something along the lines of the following: results = queries.map do |query| begin Neo4j::Session.query(query) rescue Faraday::TimeoutError nil end end After a few iterations I get an unrescued Faraday::TimeoutError: too…
griswoldbar
  • 499
  • 3
  • 10
1 2
3
11 12