Skip to content

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

@chencjiajy

Description

@chencjiajy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions