quickwit-oss/quickwit · error

unknown index subcommand

Error message

unknown index subcommand `{subcommand}`

What it means

The `quickwit index` subcommand parser received a sub-subcommand that matches none of the registered index operations (clear, create, delete, describe, search, ingest, list, ...). The subcommand was extracted from the ArgMatches but fell through the match arms to the error branch.

Solutions

  1. Run `quickwit index --help` to list valid index subcommands
  2. Check for typos or deprecated subcommand names
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at quickwit/quickwit-cli/src/index.rs:299 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08). Data as JSON: /api/errors/8f04b2b363137c07. Report an issue: GitHub.

Appendix: source

Thrown at quickwit/quickwit-cli/src/index.rs:299

            Self::Search(_) => Level::ERROR,
            _ => Level::INFO,
        }
    }

    pub fn parse_cli_args(mut matches: ArgMatches) -> anyhow::Result<Self> {
        let (subcommand, submatches) = matches
            .remove_subcommand()
            .context("failed to parse index subcommand")?;
        match subcommand.as_str() {
            "clear" => Self::parse_clear_args(submatches),
            "create" => Self::parse_create_args(submatches),
            "delete" => Self::parse_delete_args(submatches),
            "describe" => Self::parse_describe_args(submatches),
            "ingest" => Self::parse_ingest_args(submatches),
            "list" => Self::parse_list_args(submatches),
            "search" => Self::parse_search_args(submatches),
            "update" => Self::parse_update_args(submatches),
            _ => bail!("unknown index subcommand `{subcommand}`"),
        }
    }

    fn parse_clear_args(mut matches: ArgMatches) -> anyhow::Result<Self> {
        let client_args = ClientArgs::parse(&mut matches)?;
        let index_id = matches
            .remove_one::<String>("index")
            .expect("`index` should be a required arg");
        let assume_yes = matches.get_flag("yes");
        Ok(Self::Clear(ClearIndexArgs {
            client_args,
            index_id,
            assume_yes,
        }))
    }

    fn parse_create_args(mut matches: ArgMatches) -> anyhow::Result<Self> {
        let client_args = ClientArgs::parse(&mut matches)?;

View on GitHub (pinned to a39730c5cd)