neo4j

Neo4j Import Tool Hanging

走远了吗. 提交于 2019-12-12 06:19:00
问题 I'm trying to import 22,148,908 nodes and 173,574,311 edges from csv files. I left the neo4j-import tool to run overnight, but the output hasn't changed since after 5 minutes of starting. The import seems to be hanging and the output is as follows: [>:34.39 MB/s----|PROPERTIES(2)======|*NODE--------------------------------------|v:66.09 MB/s-] 16Mb Looking at top says that the thread is still doing something. CPU util on that process is consistently above 50%. However, disk usage isn't

Neo4j Error: Could not find or load main class org.neo4j.shell.StartClient

不问归期 提交于 2019-12-12 06:06:58
问题 I am facing a similar issue on my Mac as given in Error: Could not find or load main class org.neo4j.shell.StartClient. I initially installed Neo4j using .dmg installer, and it can open Neo4j community edition in browser. But when I click on the Options>Command Prompt, it opens a Terminal window: xyz$ /Applications/Neo4j \Community\Edition.app/Contents/Resources/app/bin/openNeoTerminal.sh ; exit; Neo4j Command Prompt This window is configured with Neo4j on the path. Available commands: neo4j

How to limit a subquery in cypher?

寵の児 提交于 2019-12-12 06:06:53
问题 Say I have 3 things in my graph database and each of these 3 things have 0 or more subthings attached to them. How do I make a query to retrieve the top 2 subthings for each of the things in the graph (according to some arbitrary ordering). Here's an example setup: CREATE (t1:Thing)-[:X]->(a1:SubThing), (t1)-[:X]->(a2:SubThing), (t1)-[:X]->(a3:SubThing), (t1)-[:X]->(a4:SubThing), (t2:Thing)-[:X]->(b1:SubThing), (t2)-[:X]->(b2:SubThing), (t2)-[:X]->(b3:SubThing), (t3:Thing); What match command

Neo4j-Ogm for dynamic domain object model

时光怂恿深爱的人放手 提交于 2019-12-12 06:06:52
问题 I've started to use Neo4j-ogm inside my application and it works like charm for fixed object domain model. When I know which node type connected to another node with known type - it can be easily mapped. However, in my opinion versitality of Neo4j graph database is also in an ability to work with un-typed (or dynamic) domain models and I'm having conceptual problem to understand how to achieve it with Neo4j-ogm. Let me describe my problem with an example. I have domain objects like: Message

top 10 users for each game in neo4j based of games they like

时间秒杀一切 提交于 2019-12-12 05:51:02
问题 I am trying to get top 10 users who have liked particular game with game_id from 1 to 25. These games have a relationship with user called rating with property rating_val=1 to 10 . How to get 25 rows with group of all users who have rating_val from 1 to 10 desc order for each game category. Basically : 25 game categories with id 1 to 25 games_like is a relationship with with rating_val from 1-10 users are nodes with id,name This query is not working: MATCH (u:user { user_id:"1" }) MATCH (o

Importing data into Neo4J from CSV

南笙酒味 提交于 2019-12-12 05:50:11
问题 I am trying to import a CSV containing nodes (+200000) and edges between them, into Neo4J. 1) For some reason that I could not find out, when the file size is over 5000 lines (or so), relationships do not get created at all. USING PERIODIC COMMIT 100 LOAD CSV WITH HEADERS FROM "file:///export_conceptos_50000.txt" AS csvLine FIELDTERMINATOR '\t' MERGE (c:Concepto {nom: csvLine.concepto1_sin, cat: csvLine.c1cat}) MERGE (d:Concepto {nom: csvLine.concepto2_sin, cat: csvLine.c2cat}) FOREACH

How to parse a json array with an array of arrays

邮差的信 提交于 2019-12-12 05:38:40
问题 I think I am missing something here on the parsing of this json object. The output I receive is in this format: { "columns" : [ "type", "relation" ], "data" : [ [ "SOURCE", { "paged_traverse" : "localhost/db/data/node/26/paged/traverse/{returnType}{?pageSize,leaseTime}", "outgoing_relationships" : "localhost/db/data/node/26/relationships/out", "data" : { "DATUM" : "December" }, "all_typed_relationships" : "localhost/db/data/node/26/relationships/all/{-list|&|types}", "traverse" : "localhost

Neo4j SDN4 OGM AmbiguousBaseClassException

人走茶凉 提交于 2019-12-12 05:38:22
问题 I am running into an issue wherein some of my Neo4J queries like the one below ends up in an OGM AmbiguousBaseClassException while others don't. For example findByTitle for the movie "The Score" throws an exception but "The Matrix" does not. My graph is populated by the Movie Database found at https://neo4j.com/developer/example-data/ I am unable to find an explanation to the above observation and I hope someone can help. curl http://localhost:8080/movies/search/findByTitle?title=The%20Score

Cypher: Is it possible to find creepy people following my friends?

↘锁芯ラ 提交于 2019-12-12 05:14:51
问题 Let's say I've pulled down the Twitter graph local to myself into Neo4J. I want to find people who follow my friends in number larger that should be expected. More specifically, I want to find people who follow the people I follow, but I want the results to be sorted so that the person following the highest number of my friends is sorted first. Possible in Cypher? 回答1: Here's a console example: http://console.neo4j.org/r/p36cgj create (me {n:"a"}), (fo1 {n:"fo1"}), (fo2 {n:"fo2"}), (fo3 {n:

Neo4j GraphRepository derived finder methods

老子叫甜甜 提交于 2019-12-12 05:13:11
问题 I have a problem with derived finder methods of GraphRepository. Short version: User foundUser1 = userRepository.findByEmail("test@gmail.com"); User foundUser2 = userRepository.findByPropertyValue("id", 1); works, but not: User foundUser3 = userRepository.findById(1); Long version: test-context.xml <context:annotation-config/> <neo4j:config storeDirectory="data/graph.db" /> <neo4j:repositories base-package="com.blbl.repository"/> <tx:annotation-driven mode="proxy"/> UserGraphRepository.java: