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

grouped=true queries do not return in features #322

Open
stargazing-dino opened this issue Dec 28, 2021 · 0 comments
Open

grouped=true queries do not return in features #322

stargazing-dino opened this issue Dec 28, 2021 · 0 comments

Comments

@stargazing-dino
Copy link

Hello !

From here it says that you can pass a grouped=true parameter to the api request to get the results in the form

> Features
  > Edges

rather than

> Edges

and that works for a request like

/c/en/house?grouped=true

but not for a query like:

/query?node=/c/en/house&grouped=true

my reasoning as to why

It probably comes down to here

@app.route('/query')

where this route calls query_paginated which then calls FINDER.query here:

found = FINDER.query(query, limit=limit + 1, offset=offset)

The reason I think this is because FINDER.query has the argument of a single string term argument whereas FINDER.lookup_grouped_by_feature works on a query string that's parsed.

I think it would make sense though to allow lookup_grouped_by_feature to work on a query rather than a single term. This would allow it to be used in most places where grouping is wanted.

I might be missing important a lot of things though so please let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant