quickwit-oss/quickwit · error
index ID pattern ` ` is invalid: patterns must match the…
Error message
index ID pattern `{pattern}` is invalid: patterns must match the following regular expression: `^[a-zA-Z\*][a-zA-Z0-9-_\.\*]{{0,254}}$` What it means
`validate_index_id_pattern` checked the candidate pattern (used for glob-like index matching in delete/search APIs) against the identifier-with-glob regex; it must start with a letter or `*`, may then contain letters, digits, `-`, `_`, `.`, or `*`, and be at most 255 characters. The given pattern violates one of these rules.
Solutions
- Start the pattern with a letter or `*` (not a digit or symbol)
- Use only `a-zA-Z0-9-_.` and `*` characters in the rest of the pattern
- Keep the pattern under 255 characters
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at quickwit/quickwit-config/src/lib.rs:175 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/9946fb59d4931786.
Report an issue: GitHub.
Appendix: source
Thrown at quickwit/quickwit-config/src/lib.rs:175
/// chars to allow for glob-like patterns.
pub fn validate_index_id_pattern(pattern: &str, allow_negative: bool) -> anyhow::Result<()> {
static IDENTIFIER_REGEX_WITH_GLOB_PATTERN: LazyLock<Regex> = LazyLock::new(|| {
Regex::new(r"^[a-zA-Z\*][a-zA-Z0-9-_\.\*]{0,254}$")
.expect("regular expression should compile")
});
static IDENTIFIER_REGEX_WITH_GLOB_PATTERN_NEGATIVE: LazyLock<Regex> = LazyLock::new(|| {
Regex::new(r"^-?[a-zA-Z\*][a-zA-Z0-9-_\.\*]{0,254}$")
.expect("regular expression should compile")
});
let regex = if allow_negative {
&IDENTIFIER_REGEX_WITH_GLOB_PATTERN_NEGATIVE
} else {
&IDENTIFIER_REGEX_WITH_GLOB_PATTERN
};
if !regex.is_match(pattern) {
bail!(
"index ID pattern `{pattern}` is invalid: patterns must match the following regular \
expression: `^[a-zA-Z\\*][a-zA-Z0-9-_\\.\\*]{{0,254}}$`"
);
}
// Forbid multiple stars in the pattern to force the user making simpler patterns
// as multiple stars does not bring any value.
if pattern.contains("**") {
bail!(
"index ID pattern `{pattern}` is invalid: patterns must not contain multiple \
consecutive `*`"
);
}
// If there is no star in the pattern, we need at least 3 characters.
if !pattern.contains('*') && pattern.len() < 3 {
bail!(
"index ID pattern `{pattern}` is invalid: an index ID must have at least 3 characters"
);
}View on GitHub (pinned to a39730c5cd)