Inconsistent behavior when querying properties with has()
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 636
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 14
Description
### Bug Type (问题类型)
gremlin (结果不合预期)
### Before submit
- [X] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 [FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)
### Environment (环境信息)
- Server Version: 1.0.0 (Apache Release Version)
- Backend: RocksDB x nodes, HDD or SSD
- OS: xx CPUs, xx G RAM, Ubuntu 2x.x / CentOS 7.x
- Data Size: xx vertices, xx edges
### Expected & Actual behavior (期望与实际表现)
I can retrieve the edge with `has('ep0',0.9011454)`.
```
gremlin> :> hugegraph.traversal().E().has('ep0',0.9011454)
==>[id:L712775672291917824>1>>L712775672291917825,label:el0,type:edge,outV:712775672291917824,outVLabel:vl0,inV:712775672291917825,inVLabel:vl0,properties:[ep0:0.9011454]]
```
However, when I remove all three trategies provided by HugeGraph, i.e., `HugeVertexStepStrategy`, `HugeGraphStepStrategy` and `HugeCountStepStrategy`, we cannot retrieve the edge with ID `L712775672291917824>1>>L712775672291917825`.
```
gremlin> :> import org.apache.hugegraph.traversal.optimize.HugeVertexStepStrategy; import org.apache.hugegraph.traversal.optimize.HugeGraphStepStrategy; import org.apache.hugegraph.traversal.optimize.HugeCountStepStrategy; hugegraph.traversal().withoutStrategies(HugeGraphStepStrategy).withoutStrategies(HugeCountStepStrategy).withoutStrategies(HugeVertexStepStrategy).E().has('ep0',0.9011454)
```
But I can get the correct result when turning on one of these strategies, e.g., only turning on `HugeVertexStepStrategy`.
```
gremlin> :> import org.apache.hugegraph.traversal.optimize.HugeGraphStepStrategy; import org.apache.hugegraph.traversal.optimize.HugeCountStepStrategy; hugegraph.traversal().withoutStrategies(HugeGraphStepStrategy).withoutStrategies(HugeCountStepStrategy).E().has('ep0',0.9011454)
==>[id:L712775672291917824>1>>L712775672291917825,label:el0,type:edge,outV:712775672291917824,outVLabel:vl0,inV:712775672291917825,inVLabel:vl0,properties:[ep0:0.9011454]]
```
### Vertex/Edge example (问题点 / 边数据举例)
```
SchemaManager schema = connection.getHugespecial().schema();
schema.propertyKey("ep0").asFloat().ifNotExist().create();
schema.vertexLabel("vl0").ifNotExist().create();
schema.edgeLabel("el0").sourceLabel("vl0").targetLabel("vl0").properties("ep0").ifNotExist().create();
schema.indexLabel("indexOnEl0").onE("el0").by("ep0").shard().ifNotExist().create();
Vertex v0 = new Vertex("vl0");
Vertex v1 = new Vertex("vl0");
Vertex v2 = new Vertex("vl0");
graph.addVertices(Arrays.asList(v0, v1, v2));
Edge e0 = v0.addEdge("el0",v1,"ep0",0.9011454);
Edge e1 = v0.addEdge("el0",v2,"ep0",0.075927496);
graph.addEdges(Arrays.asList(e0, e1));
```
### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.