Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Janusgraph filter query sometimes not served by index. #939

Closed
etiennedi opened this issue Aug 6, 2019 · 1 comment
Closed

Janusgraph filter query sometimes not served by index. #939

etiennedi opened this issue Aug 6, 2019 · 1 comment
Labels
bug Urgent / Blocker Highest priority of an issue. Use sparingly, for major bugs or issues blocking many users

Comments

@etiennedi
Copy link
Member

etiennedi commented Aug 6, 2019

Steps to reproduce

  1. Import 50 to 100k things
  2. Run simple filter query, such as
{
  Local {
    Get {
      Things {
          Place (where: {
          path: ["geoLocation"],
          operator: WithinGeoRange,
          valueGeoRange: {
            geoCoordinates: {
              latitude: 48.5,
              longitude: 9.2,
            },
            distance: {
              max: 20.00
            }
          }
        }) {
          name
        }
      }
    }
  }
}

Expected Results

The query is efficient, as Janusgraph makes proper use of its indices

Actual results

The query is very inefficient, Janus decides to iterate over the entire Graph.

Analysis

It seem the following query runs fine:

.and(has("prop_17", geoWithin(Geoshape.circle(48.462761, 8.412090, 20.000000))))

However, the query we use, doesn't:

.union(has("prop_17", geoWithin(Geoshape.circle(48.462761, 8.412090, 20.000000))))

Criticality

When fixed, the fix needs to become available for 0.16.x, 0.17.x, 0.18.x and 0.19.x.

@etiennedi etiennedi added bug Urgent / Blocker Highest priority of an issue. Use sparingly, for major bugs or issues blocking many users labels Aug 6, 2019
@etiennedi
Copy link
Member Author

As outlined in the analysis section, I'm investigating now whether we can simply replace the union() with and() in the affected queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Urgent / Blocker Highest priority of an issue. Use sparingly, for major bugs or issues blocking many users
Projects
None yet
Development

No branches or pull requests

1 participant