如何在neo4j中的节点上设置文本
How to set text on the node in neo4j
我想在节点上设置文本
我有一个例子,节点创建了,但是它在图中是空的,只有一个没有文字的圆圈。
merge(n1 {label:'me'})
return n1
我希望节点上有文本。
实际上,结果是这样的:
bare node image
我期望的是:
node with text
我知道我可以用这样的文本创建一个节点:
MERGE (michael:Person { name: 'Michael Douglas' })
RETURN michael
文本将是迈克尔·道格拉斯 node with name
但是如果我把它改成:
MERGE (michael:Person { name1: 'Michael Douglas' })
RETURN michael
没有文字! no text
或:
MERGE (michael:Event { name: 'Michael Douglas' })
RETURN michael
文字是数字35number text
那么设置text的原理是什么?为什么有时候会用人名,有时候是一些内部id?有时候是bare?
是否有一些规则?一些文件可以告诉?
Neo4j 浏览器自带可视化工具。
您看到的具有不同属性的节点只是视觉指南,与 Neo4j 本身完全无关。
在文档中:Neo4j Browser Style Guide
The nodes will already have sensible captions assigned by the browser, which auto-selects a property from the property list to use as a caption. You can see all the properties of that element if you click on any node or relationship. Properties will appear below the visualization. Larger property sets might be collapsed into a subset, but there is a little triangle on the right to unfold them.
Neo4j 浏览器将选择一个 "suitable" 属性 来显示。所以通常会看到 name
显示 属性 但 name1
不是。
要手动select一个属性来显示:
- Select 节点(在结果视图的上部栏中,不在视图中)
- Select 您要显示为
captions
的字段(在下方栏中)
我想在节点上设置文本
我有一个例子,节点创建了,但是它在图中是空的,只有一个没有文字的圆圈。
merge(n1 {label:'me'})
return n1
我希望节点上有文本。 实际上,结果是这样的: bare node image
我期望的是: node with text
我知道我可以用这样的文本创建一个节点:
MERGE (michael:Person { name: 'Michael Douglas' })
RETURN michael
文本将是迈克尔·道格拉斯 node with name
但是如果我把它改成:
MERGE (michael:Person { name1: 'Michael Douglas' })
RETURN michael
没有文字! no text
或:
MERGE (michael:Event { name: 'Michael Douglas' })
RETURN michael
文字是数字35number text
那么设置text的原理是什么?为什么有时候会用人名,有时候是一些内部id?有时候是bare?
是否有一些规则?一些文件可以告诉?
Neo4j 浏览器自带可视化工具。
您看到的具有不同属性的节点只是视觉指南,与 Neo4j 本身完全无关。
在文档中:Neo4j Browser Style Guide
The nodes will already have sensible captions assigned by the browser, which auto-selects a property from the property list to use as a caption. You can see all the properties of that element if you click on any node or relationship. Properties will appear below the visualization. Larger property sets might be collapsed into a subset, but there is a little triangle on the right to unfold them.
Neo4j 浏览器将选择一个 "suitable" 属性 来显示。所以通常会看到 name
显示 属性 但 name1
不是。
要手动select一个属性来显示:
- Select 节点(在结果视图的上部栏中,不在视图中)
- Select 您要显示为
captions
的字段(在下方栏中)