Skip to content

Commit

Permalink
Cover default date window in supersearch docs (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
willkg committed Oct 15, 2024
1 parent 5d5eabe commit 2e8cc7d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ test: ## Run tests

.PHONY: docs
docs: ## Update README with fresh cog output
cog -r README.rst
tox exec -e py38-lint -- cog -r README.rst
20 changes: 16 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@ supersearch
Performs a basic search on Crash Stats using the Super Search API and outputs
the results.

A basic search uses filters and can span multiple pages of results. A basic
search cannot include facets, aggregations, histograms, or cardinalities. For
those, use supersearchfacet.
A basic search uses filters and can span multiple pages of results.

There are two ways to run this:
If you want to use facets, aggregations, histograms, or cardinatlities, use
supersearchfacet.

There are two ways to supersearch:

First, you can specify Super Search API fields to generate the query.

Expand All @@ -100,6 +101,14 @@ supersearch
Make sure to use single quotes when specifying values so that your shell
doesn't expand variables or parse escape sequences.

By default, supersearch looks at crash report data for the last week. You can
specify start and end date filters to change the window of crash reports you
want to look at.

For example:

$ supersearch --date='>=2024-10-01' --date='<2024-10-15'

You can specify returned fields using the Super Search field "_columns".

For example:
Expand Down Expand Up @@ -398,6 +407,9 @@ fetch-data
--workers INTEGER RANGE how many workers to use to download data;
requires CRASHSTATS_API_TOKEN [default: 1;
1<=x<=10]
--stats / --no-stats prints download stats for large fetch-data jobs;
if it's printing download stats, it's not
printing other things [default: no-stats]
--color / --no-color whether or not to colorize output; note that
color is shut off when stdout is not an
interactive terminal automatically [default:
Expand Down
18 changes: 14 additions & 4 deletions src/crashstats_tools/cmd_supersearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,12 @@ def supersearch_cli(
Performs a basic search on Crash Stats using the Super Search API and
outputs the results.
A basic search uses filters and can span multiple pages of results. A basic
search cannot include facets, aggregations, histograms, or cardinalities.
For those, use supersearchfacet.
A basic search uses filters and can span multiple pages of results.
There are two ways to run this:
If you want to use facets, aggregations, histograms, or cardinatlities, use
supersearchfacet.
There are two ways to supersearch:
First, you can specify Super Search API fields to generate the query.
Expand All @@ -117,6 +118,15 @@ def supersearch_cli(
Make sure to use single quotes when specifying values so that your shell
doesn't expand variables or parse escape sequences.
By default, supersearch looks at crash report data for the last week. You
can specify start and end date filters to change the window of crash reports
you want to look at.
For example:
\b
$ supersearch --date='>=2024-10-01' --date='<2024-10-15'
You can specify returned fields using the Super Search field "_columns".
For example:
Expand Down

0 comments on commit 2e8cc7d

Please sign in to comment.