JanusGraph / JanusGraph/janusgraph

Incorrect result when querying edges with edge id

Open
#3,200 5 comments 0 reactions 0 assignees View on GitHub
kind/bug/possible
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

- Version: 0.6.2
- Storage Backend: inmemory
- Mixed Index Backend:
- Link to discussed bug:
- Expected Behavior: return an edge
- Current Behavior: no edge is returned
- Steps to Reproduce:

```
Vertex v1 = g.addV("vl0").property("vp0", "Bob").next();
Vertex v2 = g.addV("vl0").property("vp0", "Alice").next();
Vertex v3 = g.addV("vl0").property("vp0", "Nancy").next();
Edge e1 = g.addE("el0").from(v1).to(v2).next(); // id : ohu-sgg-iz9-6eg
Edge e2 = g.addE("el1").from(v1).to(v3).next();
g.E(e1).property("ep0", new Float(0.94461)).iterate();
g.E(e2).property("ep1", new Float(0.12354)).iterate();
```
We create two edges, and the id of `e1` is `ohu-sgg-iz9-6eg`.

However, when we query `g.E('ohu-sgg-iz9-6eg').has("ep0", 0.94461)`, there is no edge returned.

But when we query `g.E().has("ep0", 0.94461)`, the edge `e1` can be returned.

Contributor guide

Open the contributing guide

Research direction

Start by running the reproduction against the inmemory storage backend in version 0.6.2, comparing g.E('ohu-sgg-iz9-6eg').has("ep0", 0.94461) with g.E().has("ep0", 0.94461). Trace the edge-id query path and verify that the id-specific query returns e1 with its ep0 property.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.