You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by "wsd395449953 (via GitHub)" <gi...@apache.org> on 2023/02/08 03:35:26 UTC

[GitHub] [incubator-hugegraph] wsd395449953 opened a new issue, #2104: 如果属性的类型是list,如何去遍历这个集合是否包含某个值

wsd395449953 opened a new issue, #2104:
URL: https://github.com/apache/incubator-hugegraph/issues/2104

   ### Problem Type (问题类型)
   
   gremlin (结果不合预期)
   
   ### Before submit
   
   - [X] 我已经确认现有的 [Issues](https://github.com/hugegraph/hugegraph/issues) 与 [FAQ](https://hugegraph.github.io/hugegraph-doc/guides/faq.html) 中没有相同 / 重复问题
   
   ### Environment (环境信息)
   
   - Server Version: v0.11.x
   - Backend: RocksDB x nodes, HDD or SSD 
   - OS: xx CPUs, xx G RAM, Centos 7.x 
   - Data Size:  xx vertices, xx edges <!-- (like 1000W 点, 9000W 边) -->
   
   
   ### Your Question (问题描述)
   
   想到一个语句就是
   g.V().hasLabel("A").filter{it.get().property("textList").value().containsAll(["dfg"])}
   但是这种写法效率有点低,而且对集合中无法做到模糊搜索,
   比如集合中有["abc","cdf","xyz"],我搜索”c“,则返回["abc","cdf"]
   
   ### Vertex/Edge example (问题点 / 边数据举例)
   
   ```javascript
   想到一个语句就是
   g.V().hasLabel("A").filter{it.get().property("textList").value().containsAll(["dfg"])}
   但是这种写法效率有点低,而且对集合中无法做到模糊搜索,
   比如集合中有["abc","cdf","xyz"],我搜索”c“,则返回["abc","cdf"]
   ```
   
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   ```javascript
   无
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] github-actions[bot] closed issue #2104: 如果属性的类型是list,如何去遍历这个集合是否包含某个值

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #2104: 如果属性的类型是list,如何去遍历这个集合是否包含某个值
URL: https://github.com/apache/incubator-hugegraph/issues/2104


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


[GitHub] [incubator-hugegraph] javeme commented on issue #2104: 如果属性的类型是list,如何去遍历这个集合是否包含某个值

Posted by "javeme (via GitHub)" <gi...@apache.org>.
javeme commented on issue #2104:
URL: https://github.com/apache/incubator-hugegraph/issues/2104#issuecomment-1426935638

   对于单个item的过滤,可以考虑使用`unfold、filter with contains、fold`三个步骤,详细用法参考文档:
   https://tinkerpop.apache.org/docs/current/reference/#fold-step、https://tinkerpop.apache.org/docs/current/reference/#unfold-step。
   
   如果不需要返回所有属性,则可以使用step `project(id, property1.item1)`的形式,详细用法参考文档:https://tinkerpop.apache.org/docs/current/reference/#project-step。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] github-actions[bot] commented on issue #2104: 如果属性的类型是list,如何去遍历这个集合是否包含某个值

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #2104:
URL: https://github.com/apache/incubator-hugegraph/issues/2104#issuecomment-1447085761

   Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org