java - 从 JanusGraph 中检索 indexOnly
问题描述
在 JanusGraph 中,我们可以indexOnly(<label>)
像这样指定复合索引:
mgmt.buildIndex("myindex", Vertex.class).addKey(...).indexOnly(<label>).buildCompositeIndex()
在检索复合索引时,我们如何知道它是否是特定标签的索引?我没有看到任何可用于检索此信息的方法:
JanusGraphIndex index = mgmt.getGraphIndex("myindex")
// How to retrieve indexOnly details?
谢谢,
解决方案
好消息,这在即将发布的 JanusGraph v0.6.0 版本中得到了修复(已经在https://github.com/JanusGraph/janusgraph/releases/tag/v0.6.0上作为预发布版本提供)。
参见 mgmt.getIndexOnlyConstraint(indexName) 方法: https ://github.com/JanusGraph/janusgraph/blob/v0.6.0/janusgraph-core/src/main/java/org/janusgraph/core/schema/JanusGraphManagement.java
推荐阅读
- python - 用于识别产品的自定义 NER
- vega-lite - 在 vega lite 中对多面图表的行进行排序
- python - Tensorflow:从问题中获取手册的一部分的最佳实践是什么?
- android - 三星 Galaxy S10 的密度 DPI 太小?
- swiftui - SwiftUI 延迟显示自定义视图
- python - 从父类解压
- c# - 使用 Cosmos 客户端检索项目的最佳方法
- sql-server - 将 SQL 服务器迁移到 SQL 托管实例
- selenium - 无效的选择器:无法使用 ChromeDriver 和 Chrome 使用 Selenium 定位具有 xpath 表达式错误的元素
- python - 从python中的文件中读取列表格式的数据