diff --git a/src/queryer/compiler.rs b/src/queryer/compiler.rs index 6c26986..daef54c 100644 --- a/src/queryer/compiler.rs +++ b/src/queryer/compiler.rs @@ -579,7 +579,13 @@ impl<'a> Compiler<'a> { // Dynamically apply the 'active-only' default ONLY if the client // didn't explicitly request to filter on 'archived' themselves! - let has_archived_override = self.filter_keys.iter().any(|k| k == "archived"); + // Keys arrive as "field:$op" (extract_filters), so match the field, not the bare name — + // compared to "archived" alone this never matched and an explicit archived filter + // could not return archived rows. + let has_archived_override = self + .filter_keys + .iter() + .any(|k| k == "archived" || k.starts_with("archived:")); if !has_archived_override { where_clauses.push(format!("NOT {}.archived", entity_alias));