graph-databases

Graph Modeling boolean value - relationship property, or node property or none at all?

泪湿孤枕 提交于 2020-07-10 08:41:10
问题 Context A business has many Partners. Each partner could offer multiple Services to their customers. Some Partners offer All Services, some offer a few. The business can always sell a Product to that Partner, and which Product can be sold depends on whether the Partner offers a particular Service or not. So business could sell Product A to Partner A offering Service A. They could offer Product B to Partner A if they don't offer Service B. Question - if Partners, Products, Services are nodes,

'Or' operator for node properties in Gremlin assigned to one subgraph

半腔热情 提交于 2020-06-16 19:26:06
问题 I have a Janusgraph database which contains nodes with the label 'Paper', the node properties 'paperTitle' and 'year' and the edge type 'References'. I'm trying to write a query that will allow me to select two papers by title and all their references and assign that result to a subgraph. I can select one paper using two conditions like this: sg = g.V(). and(has('Paper', 'paperTitle', 'ladle pouring guide'), has('Paper', 'year', '1950')). inE('References'). subgraph('sg1'). cap('sg1'). next()

'Or' operator for node properties in Gremlin assigned to one subgraph

纵饮孤独 提交于 2020-06-16 19:23:19
问题 I have a Janusgraph database which contains nodes with the label 'Paper', the node properties 'paperTitle' and 'year' and the edge type 'References'. I'm trying to write a query that will allow me to select two papers by title and all their references and assign that result to a subgraph. I can select one paper using two conditions like this: sg = g.V(). and(has('Paper', 'paperTitle', 'ladle pouring guide'), has('Paper', 'year', '1950')). inE('References'). subgraph('sg1'). cap('sg1'). next()

'Or' operator for node properties in Gremlin assigned to one subgraph

一笑奈何 提交于 2020-06-16 19:22:16
问题 I have a Janusgraph database which contains nodes with the label 'Paper', the node properties 'paperTitle' and 'year' and the edge type 'References'. I'm trying to write a query that will allow me to select two papers by title and all their references and assign that result to a subgraph. I can select one paper using two conditions like this: sg = g.V(). and(has('Paper', 'paperTitle', 'ladle pouring guide'), has('Paper', 'year', '1950')). inE('References'). subgraph('sg1'). cap('sg1'). next()

Update action [REINDEX] cannot be invoked for index with status [INSTALLED]

让人想犯罪 __ 提交于 2020-05-26 08:04:06
问题 I am following this blog: https://developer.ibm.com/dwblog/2018/janusgraph-composite-mixed-indexes-traversals/ code : gremlin> graph.tx().rollback() ==>null gremlin> mgmt = graph.openManagement() ==>org.janusgraph.graphdb.database.management.ManagementSystem@19472803 gremlin> code = mgmt.getPropertyKey('code') ==>code gremlin> mgmt.buildIndex('byCodeComposite', Vertex.class).addKey(code).buildCompositeIndex() ==>byCodeComposite gremlin> mgmt.commit() ==>null gremlin> mgmt

how to get all related nodes idetails based on node id?

陌路散爱 提交于 2020-04-18 03:42:08
问题 I want to fetch all the connected nodes based on the node id. e.g: In the below image if I send id: 0 then I need all the nodes and edges related to that. i.e 0,1 and 2 . I am using Match (n)-[r]-() return n,r to fetch all the nodes from the db. How can I specify the id of the nodes to get all the related nodes information 来源: https://stackoverflow.com/questions/60650902/how-to-get-all-related-nodes-idetails-based-on-node-id

multiple versions of neo4j server at the same machine

允我心安 提交于 2020-02-12 04:06:32
问题 I downloaded 2 versions of neo4j on Ubuntu 18.04 which are "neo4j-community-3.5.12" and "neo4j-community-3.5.8" I run 3.5.8 with default settings I can see it from the web. http://localhost:7474/ For 3.5.12 I changed conf/neo4j.conf file and set some other port numbers for not to conflict with the default ones. 3.5.8 version runs fine on :7474. When I start 3.5.12, the logs says it is running but when I check from browser it is not running. I tried 2 different port settings, none worked.

Graph database modelling: Should i use a collection node to avoid to many rel on a node

断了今生、忘了曾经 提交于 2020-02-07 12:42:03
问题 I'm currently working on my first application that uses a Graph database (Neo4J). I'm in the process of modelling my graph on a whiteboard. My colleague and I are in a pickle on whether or not we should introduce a 'collection node'. We have something like this (Cypher syntax, Fictive example): (parking:Parking) - Parking node (car:Car) - Car node Obviously, a Parking can have multiple Cars, let's say it can have up to 1mio cars. Is it, in this case, better to introduce a new node:

Graph database modelling: Should i use a collection node to avoid to many rel on a node

折月煮酒 提交于 2020-02-07 12:40:51
问题 I'm currently working on my first application that uses a Graph database (Neo4J). I'm in the process of modelling my graph on a whiteboard. My colleague and I are in a pickle on whether or not we should introduce a 'collection node'. We have something like this (Cypher syntax, Fictive example): (parking:Parking) - Parking node (car:Car) - Car node Obviously, a Parking can have multiple Cars, let's say it can have up to 1mio cars. Is it, in this case, better to introduce a new node:

Error in inserting a string parameter to a cypher query in a java code

懵懂的女人 提交于 2020-02-07 07:09:04
问题 I want to insert a string parameter to a cypher query in Java. Below is the code I used and I have a person node named 'piyumi' and I want to make relationship with an activity node. The name of the activity node is 'walking'. When I execute the code I get http status code 400. Can anyone help me to modify the cypher query so that I can insert the string variable s without error. import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey