如果我在事务密码索引中不返回任何内容,但如果我在运行密码查询之前使用 SpringRest 或提交,它将返回节点。这是上下文:我有一个带有索引的对象,并且我正在通过 插入它Neo4jTemplate.save()
,如果我用来GraphRepository.findByPropertyValue()
保存对象,它会返回ok,但如果我使用Cypher
with index 它不会返回任何内容。Cypher
如果我通过 nodeID 获取它,则唯一返回该对象。
@NodeEntity
public class Group {
@GraphId
private Long nodeId;
@Indexed(indexName = "groupIndex")
private Long id;
}
使用时确定:
GraphRepository.findByProperty("id", 1L);
Neo4jTemplate.query("START n=node(1) RETURN n");
使用时什么都没有:
Map<String, Object> params = new HashMap<>();
params.put("id", 1L);
Neo4jTemplate.query("START n=node:groupIndex(id={id}) RETURN n", params);