Linary

Results comments of Linary

目前HugeGraph是支持属性的全文检索的,比如顶点的“地址”属性是:“北京市海淀区中关村软件园”,并且给该类顶点的“地址”建立了`search`索引,在查询时通过"北京市"、“海淀区”是能查到该顶点的。 例子: ``` // 元数据定义 schema.propertyKey("name").asText().ifNotExist().create(); schema.propertyKey("address").asText().ifNotExist().create(); schema.vertexLabel("person").useCustomizeStringId().properties("name", "address").ifNotExist().create(); schema.indexLabel("personByAddress").onV("person").search().by("address").ifNotExist().create(); // 插入顶点 Vertex A = graph.addVertex(T.label, "person", T.id, "A", "name", "A", "address", "北京市海淀区"); Vertex B = graph.addVertex(T.label, "person", T.id, "B",...

search是来做全文检索的,详细可以参考: https://github.com/hugegraph/hugegraph/issues/258 https://github.com/hugegraph/hugegraph/issues/294

@cmdares 感谢关注,我们会尽快给出评测对比。

@mingzichongfu ``` Vertex vertex1=HugeGraphService.getInstance().createVertex("person", sfzh, gmxm); Vertex vertex2=HugeGraphService.getInstance().createVertex("person", hzsfzh,""); ``` createVertex方法的实现能否给出,`sfzh, gmxm`这两个参数你是作为key和value处理了,还是两个各作为一个属性的value处理的。 或者能否直接给出VertexLabel的定义看看。

@mingzichongfu 嗯,这个方法应该没问题,你用的是0.7.4版本的 hugegraph 吗?

> > @mingzichongfu 多谢反馈,明白你遇到的问题了,我们会根据提供的代码进行重现和分析。 > > 目前可以你可以通过` Map map`来映射一下顶点id,把`graph.getVertex(sfzh)`换为`map.get(sfzh)`,map的更新在`vertexList =graph.addVertices(vertexList);`之后进行: > > `vertexList.forEach(vertex -> map.put(vertex.property("sfzh"), vertex.id())` > > 放到map里和放到对象里 做法应该没什么分别吧。 问题关键是执行程序 插入了十几万数据后,根据顶点id获取顶点失败,拿报错提示的id去hugegraph-studio 通过 gremlin能查询到顶点。 @mingzichongfu 我们分析了代码,发现报错是下面这两行导致的 ``` Vertex _source=graph.getVertex("2:"+eb.getSourceKey()); Vertex...

@mingzichongfu 我们尝试模拟你的数据去复现这个BUG,但是没有能复现成功。 下面是我的测试类,逻辑应该跟你的一致,我只有一处修改:将 edgeLabel 固定为"knows"(我不清楚你的String gx =rs.getString("gx") 是否每次都是同一个值)。你对比一下有没有关键性的不同,如果没有麻烦试试这个测试类在你那儿跑有没有问题。 ``` public static void main(String[] args) { // If connect failed will throw a exception. HugeClient hugeClient = new HugeClient("http://localhost:8080", "hugegraph"); SchemaManager...

@mingzichongfu 我试着将 sfzh 的生成方式修改成random(10000) 的也没能复现。关于缓存,server端是有缓存的,client端没有。