Skip to content

Flutterflow Query Parameters Requirement Breaks Elasticsearch Query API call #14

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

Open
chipzzz opened this issue Dec 18, 2021 · 0 comments

Comments

@chipzzz
Copy link

chipzzz commented Dec 18, 2021

Hi,

First of all, loving the product, started using it not too long ago as a way to build my first MVP app and found a pretty nice strategy to use Elasticsearch Rest API querying to result content into the app.

I am using the following query(expanded from API call url for readability), which allows me to group by certain products(allowing me to populate a list of items in the app) and get all of their metadata all in a single API call.

{
  "track_total_hits": true,
  "size": 0,
  "aggs": {
    "name": {
      "terms": {
        "field": "name.keyword",
        "size": "100"
      },
      "aggs": {
        "meta": {
          "top_hits": {
            "_source": {
              "include": [ "brand", "price"]
            },
            "size": 1
          }
        }
      }
    }
  }
}

However, upon setting up that API call I get the error of
Screen Shot 2021-12-17 at 9 44 36 PM

Which pertain to using an array to get the field values I want here for each product.

              "include": [ "brand", "price"]

Now I understand the other feature and its use case for API calls, it's wonderful. However, can we make this check that produces the error somewhat more lenient? Where it won't disallow my API call that includes brackets in the url, i.e it won't disallow my array object?

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