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

support nested aggregations and cardinality (#102, #103) #124

Merged
merged 3 commits into from
Apr 12, 2024
Merged

Conversation

willkg
Copy link
Collaborator

@willkg willkg commented Apr 12, 2024

The following all work now:

supersearchfacet --_facets=product

supersearchfacet --_facets=product --leftover-count

supersearchfacet --_facets=_cardinality.product

supersearchfacet --_facets=_cardinality.product --leftover-count

supersearchfacet --_aggs.product=platform

supersearchfacet --_aggs.product=platform --leftover-count

supersearchfacet --_aggs.product=release_channel

supersearchfacet --_aggs.product=release_channel --leftover-count

supersearchfacet --_aggs.product.version=_cardinality.install_time

supersearchfacet --_aggs.product.version=_cardinality.install_time --leftover-count

supersearchfacet --_histogram.date=product --_histogram_interval.date=1d

supersearchfacet --_histogram.date=product --_histogram_interval.date=1d --leftover-count

supersearchfacet --_histogram.date=_cardinality.product --relative-range=5d

Fixes #102
Fixes #103

This overhauls supersearchfacet adding support for the following:

1. better histograms
2. nested aggs
3. cardinality
4. combinations of the above

There are some things that curiously don't work, but I think those are
bugs in Crash Stats and not in crashstats-tools. For example, this
works:

```
$ supersearchfacet --_aggs.product.version=platform
```

This doesn't work and yields no output:

```
$ supersearchfacet --_aggs.product.platform=version
```
if key.startswith("cardinality"):
# term_counts here is something like: {"value": 6}
#
# convert to [{"term": "value", "count": "6"}]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops--this is wrong.

This improves the documentation, adds new examples, fixes existing
examples, and reduces redundancy in cog generators.
@willkg willkg merged commit dcc9297 into main Apr 12, 2024
5 checks passed
@willkg willkg deleted the 103-nested branch September 4, 2024 16:21
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.

support nested aggregations support _cardinality as a histogram value
1 participant