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

Get avg of more than one fields in document using search query of elastic-search through GraphQL API #460

Open
2 tasks
MuhammadAbdullah54321 opened this issue Apr 14, 2022 · 0 comments
Labels
feature-request New feature or request GraphQL

Comments

@MuhammadAbdullah54321
Copy link

MuhammadAbdullah54321 commented Apr 14, 2022

Is this related to a new or existing framework?

React Native

Is this related to a new or existing API?

GraphQL API

Is this related to another service?

Elastic Search or Open Search(new name)

Describe the feature you'd like to request

I am trying to use searchRatings query to get avg of different fields.
But currently I am limited to get avg of only one of the fields

I have around 50 different columns/fields in table/document in elastic-search

I want to get avg of all the fields which is currently not possible
as you can see I can only select one of the fields from the drop down infront of field under aggregates
Screenshot 2022-04-14 at 3 39 11 PM

Describe the solution you'd like

I would like to have the option to get avg of as many fields as I want through GraphQL API provided by Amplify
It may be in the form of array as in case of applying filters ...that we can apply many filters at the same time.

I do not want to make query request 50 times if I want avg of all 50 fields in my document in elastic search.

I have checked elastic search directly through dev tools ... Its is indeed possible to query elastic search directly for more than one field
Here is the screenshot attached where I am getting avg of three different fields at the same time
WhatsApp Image 2022-04-15 at 4 03 07 PM

Describe alternatives you've considered

Alternatively I am considering to directly query elastic search server using Node package ... bypassing Amplify and GraphQL to have desired results

But I wish to have this feature available through Amplify and GraphQL auto generated queries

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change
@MuhammadAbdullah54321 MuhammadAbdullah54321 added the feature-request New feature or request label Apr 14, 2022
@stocaaro stocaaro transferred this issue from aws-amplify/amplify-js Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request GraphQL
Projects
None yet
Development

No branches or pull requests

2 participants