Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何对cardinality 为list或set 的属性建索引? #893

Closed
chencjiajy opened this issue Mar 14, 2020 · 2 comments · Fixed by #1474
Closed

如何对cardinality 为list或set 的属性建索引? #893

chencjiajy opened this issue Mar 14, 2020 · 2 comments · Fixed by #1474
Labels
feature New feature

Comments

@chencjiajy
Copy link

Expected behavior 期望表现

希望对cardinality 为list或set 的属性建索引

schema.propertyKey("city").asText().valueSet().ifNotExist().create();
schema.indexLabel("personByCity").onV("person").by("city").search().ifNotExist().create();

Actual behavior 实际表现

报错Caused by: class java.lang.IllegalArgumentException: Not allowed to build index on property key 'city' whose cardinality is list or set

因为目前hugegraph 必须创建索引之后才能通过单个属性查询,那么当cardinality 为list或set 的属性如何查询呢

Steps to reproduce the problem 复现步骤

Schema(VertexLabel, EdgeLabel, IndexLabel) 元数据结构

{type something here...}

Specifications of environment 环境信息

  • hugegraph version: 0.10.4
@javeme
Copy link
Contributor

javeme commented Mar 14, 2020

@chencjiajy 目前不支持这个特性,暂时可以通过增加一个string属性来存,把list值转换为string。
后续会考虑支持。

@javeme javeme added the feature New feature label Mar 14, 2020
@bingle2000
Copy link

@chencjiajy 目前不支持这个特性,暂时可以通过增加一个string属性来存,把list值转换为string。
后续会考虑支持。

不知道这个功能特性是否已经实现,没有的话可有计划?

jadepeng pushed a commit to jadepeng/hugegraph that referenced this issue Jun 25, 2021
jadepeng pushed a commit to jadepeng/hugegraph that referenced this issue Jun 25, 2021
jadepeng pushed a commit to jadepeng/hugegraph that referenced this issue Jul 2, 2021
jadepeng pushed a commit to jadepeng/hugegraph that referenced this issue Jul 6, 2021
jadepeng pushed a commit to jadepeng/hugegraph that referenced this issue Jul 7, 2021
zhoney pushed a commit that referenced this issue Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants