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

Parse fails with multiple buckets #6

Open
riteable opened this issue Mar 5, 2020 · 1 comment
Open

Parse fails with multiple buckets #6

riteable opened this issue Mar 5, 2020 · 1 comment

Comments

@riteable
Copy link

riteable commented Mar 5, 2020

The parsing breaks when the response is as follows:

var esResponse = {
      "aggregations": {
        "offerId": {
          "doc_count_error_upper_bound": 0,
          "sum_other_doc_count": 0,
          "buckets": [{
            "key": "F1A2LqSYD3u",
            "doc_count": 9,
            "os": {
              "doc_count_error_upper_bound": 0,
              "sum_other_doc_count": 0,
              "buckets": [{
                "key": "Desktop",
                "doc_count": 6,
                "campaignClick": {"value": 6.0},
                "offerClick": {"value": 6.0},
                "revenue": {"value": 0.0}
              }, {
                "key": "Mobile",
                "doc_count": 3,
                "campaignClick": {"value": 4.0},
                "offerClick": {"value": 4.0},
                "revenue": {"value": 0.0}
              }]
            }
          }]
        }
      }
    };

Notice the multiple buckets in the "os" aggregation.

@isabek
Copy link
Owner

isabek commented Mar 5, 2020

Hey @riteable. You can make a PR. Actually, I don't have time to support this module.

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

2 participants