neo4j

Neo4j Configuration

半腔热情 提交于 2019-12-13 16:19:54
问题 I'm using Neo4j server. I'm running into an issue where the loads are relatively low. However, the response times are quite high. I think that the number of threads servicing requests is simply too small. Is there a way to adjust the size of the thread pool for servicing HTTP requests. Is that possible? 回答1: It's a common misconception that more threads equals more performance. In reality it's often the other way around -- more threads equals lesser performance. I don't know how your graph or

Graphdb/Neo4j relationship to another relationship, or relationship with 3 nodes

扶醉桌前 提交于 2019-12-13 16:09:54
问题 I want to make IMDB's characters/roles structure in Neo4j. I'll need labels Person , Movie and Character . Character , because a character can be in multiple movies, played by different people. Without Character , it's easy: (Person)-[:PLAYS_IN]->(Movie) But PLAYS_IN is a Character , so it would be something like: (Person)-[:PLAYS_AS]->(Character)-[:PLAYS_IN]->(Movie) but that doesn't work, because it doesn't have a direct Person-Movie relationship. Without that, everyone who ever played

How to query property value when property name is a parameter?

自古美人都是妖i 提交于 2019-12-13 15:26:47
问题 Typically we can query property value for something like: Match (n:Product) where n.name="iPhone X" return n However, in my case, I don't know which property I should match, but I only know the value, in which case the property name becomes a kind of variable. I want something like this: Match (n:Product) where n.{name}="iPhone X" return n or with relationship variable r: Match (n:Product)-[{r}]->(c:Color {name:'white'}) In both cases, in my application I know some property or relationship

Multiple relationships of the same type but with different properties between the same two nodes

回眸只為那壹抹淺笑 提交于 2019-12-13 15:24:46
问题 Can I create multiple relationships of the same type between the same two nodes? I am trying to discover patterns in nodes connected with the same relationship type. For e.g., relation PERFORMED_BY could have a property to record Person1 as the performer with a timestamp for the transition from node A to node B and a second relation PERFORMED_BY could have Person2 as the performer at a different time between the same two nodes. 回答1: Yes, you can have multiple relationships of the same type

Spring Data Neo4j - @Autowired Repository == null

試著忘記壹切 提交于 2019-12-13 15:24:01
问题 I try to write a webapp using Spring Data Neo4j. I have an Repository: public interface UserRepository extends GraphRepository<Neo4jUser> {} an applicationcontext.xml: ... <context:component-scan base-package="de.wilke.test.neo4j" > <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/> </context:component-scan> <!-- REST Connection to Neo4j server --> <bean id="restGraphDatabase" class="org.springframework.data.neo4j.rest.SpringRestGraphDatabase">

py2neo using get or create in WriteBatch

﹥>﹥吖頭↗ 提交于 2019-12-13 15:16:49
问题 I am just getting started with Neo4j and py2neo. I am experimenting with the batch feature available in py2neo for bulk data loading of a neo4j database. At a basic level, I want to create two nodes (or get them if they already exist) and create a relationship between them with a default weight (or increment the weight if the relationship already exists) using WriteBatch in py2neo. The documentation explains only how to create two new nodes and form a relationship between them. I am looking

neo4j - batch insertion using neo4j rest graph db

笑着哭i 提交于 2019-12-13 14:17:03
问题 I'm using version 2.0.1 . I have like hundred of thousands of nodes that needs to be inserted. My neo4j graph db is on a stand alone server, and I'm using RestApi through the neo4j rest graph db library to achieved this. However, I'm facing a slow performance result. I've chopped my queries into batches, sending 500 cypher statements in a single http call. The result that I'm getting is like: 10:38:10.984 INFO commit 10:38:13.161 INFO commit 10:38:13.277 INFO commit 10:38:15.132 INFO commit

Creating rails model with Object.const_set

烈酒焚心 提交于 2019-12-13 13:15:29
问题 I am playing around in the rails console with Neo4j and tried to create a model class like this: Object.const_set("TestNode", Class.new(super_class=Neo4j::Rails::Model)) node = TestNode.new if i then try to save the instance with node.save I get a bunch of errors: node.save NoMethodError: undefined method `each' for nil:NilClass from /Users/oskbor/.rvm/gems/jruby-1.6.7.2/gems/neo4j-2.0.0-java/lib/neo4j/rails/attributes.rb:57:in `init_on_create' from /Users/oskbor/.rvm/gems/jruby-1.6.7.2/gems

Fatal error: Uncaught Error: using graphaware for PHP

陌路散爱 提交于 2019-12-13 11:28:29
问题 I am using graphaware to connect to a neo4j graph database. I keep getting an error saying Fatal error: Uncaught Error even though I'm using the library in composer.json. Here is the code for the autoload.php: <?php /* * This file is part of the GraphAware Neo4j PHP OGM package. * * (c) GraphAware Ltd <info@graphaware.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ error_reporting(E_ALL | E_STRICT);

neo4j cant be installed

会有一股神秘感。 提交于 2019-12-13 08:45:32
问题 I have tried following the official guide provided by neo4j for installation in Ubuntu,but at one point I wrongly added 2 entries in the sources.list file and tried installing. After that I removed the entries and started from the beginning but It shows this error. $ sudo apt-get install neo4j Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are