JanusGraph / JanusGraph/janusgraph
Unexpected result for indexed property
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
We have the following query: g.E().hasId('pwrc-159kw-74l-1b8h4').inV().valueMap()
The result of the query is: {EntityId=[12], uid=[User:12], AccountId=[15]}
When I try to run the following: g.E().hasId('pwrc-159kw-74l-1b8h4').inV().valueMap('AccountId') I receive the {AccountId=[15]}. It is correct.
However when I run the following query: g.E().hasId('pwrc-159kw-74l-1b8h4').inV().valueMap('uid')
I receive the empty result {}
Also the following queries returns incorrect results:
g.E().hasId('pwrc-159kw-74l-1b8h4').inV().has('uid') - empty
gremlin> g.E().hasId('pwrc-159kw-74l-1b8h4').inV().hasNot('uid') - v[2203816]

It is just reproduced for few vertexes of thousands vertexes we have in Graph.
The 'uid' property has the unique index 'byUniqueId' created. Is it possible that index was broken? However as it is graph index, we suppose it doesn't matter

Any ideas how to fix it?
Contributor guide
Research direction
No source files or tests are named. Start by reproducing the listed Gremlin queries against the affected vertices and inspecting the unique index named byUniqueId; done means uid property retrieval and has/hasNot queries consistently agree with valueMap results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100