janusgraph
janusgraph copied to clipboard
Fix mixed index query for neq condition
If a mixed index consists of multiple properties, then an element can be
indexed as long as it contains one of these properties. In this case, a
query like has(keyA, neq(val)) could match an element without keyA
as long as it is indexed by this mixed index. This commit fixes this bug
by adding an existence condition, i.e. matching an element only if it
has the given key present.
Fixes #3164
Thank you for contributing to JanusGraph!
In order to streamline the review of the contribution we ask you to ensure the following steps have been taken:
For all changes:
- [ ] Is there an issue associated with this PR? Is it referenced in the commit message?
- [ ] Does your PR body contain #xyz where xyz is the issue number you are trying to resolve?
- [ ] Has your PR been rebased against the latest commit within the target branch (typically
master)? - [ ] Is your initial contribution a single, squashed commit?
For code changes:
- [ ] Have you written and/or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
- [ ] If applicable, have you updated the LICENSE.txt file, including the main LICENSE.txt file in the root of this repository?
- [ ] If applicable, have you updated the NOTICE.txt file, including the main NOTICE.txt file found in the root of this repository?
For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in which it is rendered?