Spring 动态@Properties 的数据 Neo4j 5 和@Index

Spring Data Neo4j 5 and @Index for dynamic @Properties

如何正确索引 SDN 5 动态 @Properties?

以下 属性 声明是否有效:

@Index(unique = false)
@Properties(prefix = NAME_PROPERTY_PREFIX)
private Map<String, String> nameProperties = new HashMap<>();

nameProperties 映射中的所有属性键是否会单独编制索引?请描述。

不支持此功能,因为如果启用自动索引,索引创建将在应用程序启动时扫描 classes。由于扫描 class 时没有发现已知字段(映射键),因此没有创建索引。

此外,当我从上面尝试您的示例时,我看到在 属性 字段名称 (nameProperties) 上创建了一个无用的索引,该索引从未在 Neo4j 中使用过。