pub fn adaptive_limit(query: &str, base_limit: i32) -> i32
Return an adaptive result limit based on query complexity.