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

Implement rate aggregation #37

Merged
merged 1 commit into from
Oct 30, 2021
Merged

Implement rate aggregation #37

merged 1 commit into from
Oct 30, 2021

Conversation

iamazy
Copy link
Contributor

@iamazy iamazy commented Oct 30, 2021

No description provided.

@iamazy iamazy requested a review from a team October 30, 2021 04:34
@buinauskas buinauskas merged commit 9eeb145 into vinted:master Oct 30, 2021
@iamazy iamazy deleted the rate_agg branch October 30, 2021 13:56
@buinauskas
Copy link
Collaborator

buinauskas commented Oct 31, 2021

@iamazy just spotted this

Isn't field a required field for rate aggregation? Now it's an optional one.

@iamazy
Copy link
Contributor Author

iamazy commented Nov 1, 2021

@iamazy just spotted this

Isn't field a required field for rate aggregation? Now it's an optional one.

When RateAggregation is subaggregation of DateHistogramAggregation, field is not required. Official website gave a example.

GET sales/_search
{
  "size": 0,
  "aggs": {
    "by_date": {
      "date_histogram": {
        "field": "date",
        "calendar_interval": "month"  
      },
      "aggs": {
        "my_rate": {
          "rate": {
            "unit": "year"  
          }
        }
      }
    }
  }
}

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

Successfully merging this pull request may close these issues.

2 participants