Skip to content

grouped=true queries do not return in features #322

Open

Description

@stargazing-dino

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions