-
Notifications
You must be signed in to change notification settings - Fork 525
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
[Bug]within do not return the correct result #1794
Labels
bug
Something isn't working
Comments
@zhouliweb 感谢反馈,出了查询语句,能否再提供下后端存储、版本号、示例数据呢?以便于我们复现该问题 |
已经增加示例数据 |
@zhouliweb 收到更新,谢谢。请问是否有创建索引呢? |
已确认该问题是关于search-index的Bug,我们尽快修复。可以暂时去除 另外,示例存在一些小问题,已更正: 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();
schema.indexLabel('test_by_type').onV('test').by('type').range().ifNotExist().create();
schema.indexLabel('test_by_confirmType').onV('test').by('confirmType').range().ifNotExist().create();
schema.indexLabel('test_by_name').onV('test').by('name').search().ifNotExist().create();
graph.addVertex(T.label, 'test', 'name', '诚信', 'confirmType', 0, 'type', 1, 'kid', 0);
graph.addVertex(T.label, 'test', 'name', '诚信', 'confirmType', 1, 'type', 1, 'kid', 1);
graph.addVertex(T.label, 'test', 'name', '诚信文明', 'confirmType', 2, 'type', 1, 'kid', 2);
graph.addVertex(T.label, 'test', 'name', '诚信文明', 'confirmType', 3, 'type', 1, 'kid', 3);
g.V().has('type', 1).has('confirmType',within(0,2,3)).has('name',Text.contains('诚信')); |
谢谢答复 |
javeme
added a commit
that referenced
this issue
Mar 29, 2022
fix #1794 Change-Id: I4f4f2f52b6986ca5af9a27ee4677e16387235c0b
imbajin
pushed a commit
that referenced
this issue
Apr 19, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Type (问题类型)
gremlin (结果不合预期)
Before submit
Environment (环境信息)
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
The text was updated successfully, but these errors were encountered: