neo4j

Building a complex output and ranking the records in Neo4j

北城以北 提交于 2019-12-13 02:43:12
问题 This issue is directly related to the previous post: How to calculate rank for float values in Neo4j? I am trying to merge the "rank" and "weight" values with origin and path. I could successfully do this for origin: CALL apoc.load.json("file:///.../input.json") YIELD value UNWIND value.origin AS orig MATCH(origin:concept{name:orig.label}) WITH value, collect(origin) as origins UNWIND value.target AS tar MATCH(target:concept{name:tar.label}) UNWIND origins AS origin WITH origin, target CALL

Neo4j: fulltext indices and auto indexing in Cypher

孤街浪徒 提交于 2019-12-13 02:39:38
问题 I'm currently struggeling with fulltext indices and auto indexing in Cypher. I'm using Java embedded, Neo4j v 1.8.2. My basic question is: How can fulltext indices be queried with Cypher? When I create the following index: Index<Node> fulltextIndex = index.forNodes( "fulltextIndex", MapUtil.stringMap( IndexManager.PROVIDER, "lucene", "type", "fulltext" ) ); The following Cypher statement does not return anything: START n=node:fulltextIndex(name='*er*') RETURN n; The following piece of java

Cause of neo4j IndexOutOfBoundsException on getRelationships()

梦想与她 提交于 2019-12-13 02:38:40
问题 This is happening in neo4j version 2.3.0-M02 Why might this code .... Iterable<Relationship> rels = node.getRelationships( ... any various args ... ); for (Relationship rel : rels) { // Some computation } ... cause this stack trace ? Caused by: java.lang.IndexOutOfBoundsException at org.neo4j.io.pagecache.impl.muninn.MuninnPageCursor.setOffset(MuninnPageCursor.java:410) at org.neo4j.kernel.impl.store.RelationshipGroupStore.getRecord(RelationshipGroupStore.java:117) at org.neo4j.kernel.impl

Parse streaming JSON

本秂侑毒 提交于 2019-12-13 02:37:27
问题 I've got a tool I'm working on that parses Neo4j responses and emits objects. https://github.com/brian-gates/neo4j-stream-deserializer My questions: How can I handle errors? Is there a better way to handle headers than two parsers? Seems like unnecessary overhead. The possible error responses look like this: { message: 'Error explanation, ... other useful info ... } Full example: https://gist.github.com/brian-gates/4a16e0aee13d6e549d52 With successful responses looking like this: { columns: [

Neo4jClient node ids

空扰寡人 提交于 2019-12-13 02:37:24
问题 I'm having trouble working out how the ID work in Neo4jClient. I want my .NET model to have an identifier property, and ideally I'd like it just to use the Neo4j autoincremented id for that node. However, no matter what case I use ( id , ID , Id ) in my model class, it always adds this as another field in Neo4j (keeping it as 0 when I create a new node). So when I view that node in the Neo4j browser, it has a <id> which is auto-incremented, and also my id field which is always 0 (unless I

Filtering on node property in long distance path

本秂侑毒 提交于 2019-12-13 02:05:26
问题 Starting from an item recommended by people, is there a way to filter on a person property, such as age, while traversing at long distance friendship relationships? For instance in the following cypher query, I'd like to only traverse nodes of person +18y, not just filtering on p's age. MATCH path = (:Fruit {Name: 'Apple'}) <-[:LIKES]- (:Person) -[:FRIENDOF*1..5]- (p:Person) -[:LIKES]-> (:Device {Name: 'iPhone'}) return path UPDATE more details : In this exemple the graph contains molecules

neo4j use of list properties

给你一囗甜甜゛ 提交于 2019-12-13 01:31:02
问题 I have just started learning neo4j with c# client, and I'm having trouble understanding exact usage of list properies. In the example app Im using (which runs on top of "Cineasts Movies & Actors" dataset) there is a class Actor with following properties: public class Actor { public String id { get; set; } public String name { get; set; } public String birthplace { get; set; } public String birthday { get; set; } public String biography { get; set; } public List<Movie> filmography { get; set;

How to add infinity, NaN, or null values to a double[] property on a node in Cypher/Neo4j

独自空忆成欢 提交于 2019-12-13 00:41:55
问题 I have some nodes in my neo4j graph that are a combination of multiple entities. On these nodes I have a property named "p_value" that has a type of double[]. I'm merging new entities into existing nodes and with my merge command I'm using on match to push the new p_values onto the end of this double[] array. The issues is that for some of my entities I don't have p_values, so I need to push something like -infinity/infinity, NaN, or NULL into my double[] p_value array. Here is an example

creating multiple nodes with properties in json in neo4j

旧时模样 提交于 2019-12-13 00:37:09
问题 I am a newbie in Neo4j and facing a small problem. I created around 5000 router nodes with its ipaddress property set to specific ip. Now I have around 5000 more interfaces and needs to create their nodes. I am using json and rest api for that in c++. Every interface has a Routerip property and if the routerip matches the ipaddress of the router node that is already created I need to create that interface. I have used this http://docs.neo4j.org/chunked/snapshot/rest-api-cypher.html#rest-api

How to access Neo4j dataset through Javascript?

允我心安 提交于 2019-12-12 22:18:50
问题 I am wondering how I get access to my (example)dataset that I have on Neo4j through Javascript, i.e. I have a movie dataset, so I would like to get and receive queries through an local html page? As you might wonder, I am a very beginner to this and I really appreciate it if someone would explain it to me step by step :) Thanks in advance 回答1: You can access your Neo4j graph database through the http transactional endpoint http://neo4j.com/docs/stable/rest-api-transactional.html and issue