JanusGraph / JanusGraph/janusgraph

Incorrect result when sorting vertices or edges with property

Open
#3,269 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug/possible
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

Stack Trace (if you have one)
Vertex v1 = g.addV("vl0").property("vp0", "Bob").next();  // id: 4201
Vertex v2 = g.addV("vl0").property("vp1", "Alice").next(); // id: 4200

When we execute the query g.V(4200, 4201).order().by('vp0'), JanusGraph returns these two vertices.

However, we expect only vertex v1 is returned.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Reproduce the query with the in-memory storage backend and Lucene mixed index using the two vertices and their properties, then trace the vertex-ordering path. Done means the query returns only v1 when ordering g.V(4200, 4201) by vp0.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.