Examples of rank CLI usage

All flags in the following commands should be optional, and the CLI should prompt the user for any missing information, allowing them to select from the available options where appropriate.

rank
├── index
│   ├── list
│   ├── create
│   ├── update
│   ├── delete
│   ├── get
│   └── replicate
├── task
│   ├── check
│   └── delete
├── search
│   ├── get-term
│   └── compare
└── test
    ├── run
    └── list
rank index list

List all the indices in the rank cluster.

rank index create --source <source> --target <target> --config <config>

Create a new index in the rank cluster, using data from a copy of a production index (also in the rank cluster), and a locally defined settings/mapping config.

rank index update --index <index> --config <config> --run

Update the settings/mapping config for an existing index in the rank cluster. Should allow the user to run the update-by-query for all documents immediately, or leave it to be run later.

rank index delete --index <index>

Delete an index in the rank cluster.

rank index get --index <index>

Fetch a copy of the settings/mapping config for an index in the rank cluster.

rank index replicate --source <source> --target <target>

Copy an index from the rank cluster to a production cluster using cross-cluster replication.

rank task check --task <task>

Check the progress/status of a reindex or update-by-query task.

rank task delete --task <task>

Cancel a task.

rank search --index <index> --query <query> --search-terms <searchTerms>

Run a search against an index in the rank cluster, outputting formatted results to stdout.

rank search get-terms -n <n> --timestamp <timestamp> 

Fetch a set of real search terms from the reporting cluster for each content type, and write them to a local file. n should specify the number of terms to fetch, and timestamp should specify the point in time before which search terms should be retrieved. If a timestamp is not provided, the current time should be used. Specifying a timestamp allows users to fully reproduce a test at a later date or in a different environment.

rank search compare-query-speed --index <index> --query <query> --terms <terms>

Run searches against an index in the rank cluster using a set of real search terms, and compare the speed of the candidate query against the production query.

rank test run --index <index> --query <query> --test-id <testId>

Run a test against an index in the rank cluster. Test ID should be optional, and if not provided, all tests should be run.

rank test list

List the available tests using a modified pytest --collect-only

Last updated