Skip to content

[Bug]within do not return the correct result #1794

@zhouliweb

Description

@zhouliweb

Bug Type (问题类型)

gremlin (结果不合预期)

Before submit

  • 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题

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

Expected & Actual behavior (期望与实际表现)

使用within直接查询能起作用,但是多次拼接查询,没数据

gremlin> :> g.V().has('name',Text.contains('诚信')).has('type', 0).where(values('confirmType').is(neq(1))).valueMap('name','confirmType').limit(1)
==>[name:[诚信],confirmType:[0]]
gremlin> :> g.V().has('name',Text.contains('诚信')).has('type', 0).has('confirmType',within(0,2,3)).valueMap('name','confirmType').limit(1)
gremlin>
gremlin> :> g.V().has('type', 0).has('confirmType',within(0,2,3)).has('name',Text.contains('诚信')).valueMap('name','confirmType').limit(1)
gremlin>
gremlin> :> g.V().has('type', 0).has('name',Text.contains('诚信')).has('confirmType',within(3,2,0)).valueMap('name','confirmType').limit(1)
==>[name:[诚信],confirmType:[0]]
gremlin> :> g.V().has('type', 0).has('name',Text.contains('诚信')).valueMap('name','confirmType').limit(1)
==>[name:[诚信],confirmType:[0]]
gremlin> :> g.V().has('type', 0).has('name',Text.contains('诚信')).has('confirmType',0).valueMap('name','confirmType').limit(1)
==>[name:[诚信],confirmType:[0]]

Vertex/Edge example (问题点 / 边数据举例)

No response

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

schema.propertyKey("type").asInt().ifNotExist().create();
schema.propertyKey("kid").asInt().ifNotExist().create();
schema.propertyKey("name").asText().ifNotExist().create();
schema.propertyKey("confirmType").asInt().ifNotExist().create();

schema.vertexLabel("test").properties("confirmType","name","kid","type").nullableKeys("confirmType","name","type").primaryKeys("kid").ifNotExist().create();

g.addVertex(T.label, "tets", "name", "诚信", "confirmType", 0, "type", 1,"kid",1);
g.V().has('type', 1).has('confirmType',within(0,2,3)).has('name',Text.contains('诚信'));
g.V().has('type', 1).has('confirmType',within(3,2,0)).has('name',Text.contains('诚信'));

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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