diff --git a/src/meta_plugin/text.rs b/src/meta_plugin/text.rs index a1c1614..59679c5 100644 --- a/src/meta_plugin/text.rs +++ b/src/meta_plugin/text.rs @@ -48,10 +48,20 @@ impl TextMetaPlugin { outputs, ); - // Set default text_detect_size option if not provided - if !base.options.contains_key("text_detect_size") { - base.options.insert("text_detect_size".to_string(), - serde_yaml::Value::Number(PIPESIZE.into())); + // Set default options if not provided + let default_options = vec![ + ("text_detect_size", serde_yaml::Value::Number(PIPESIZE.into())), + ("text_word_count", serde_yaml::Value::Bool(true)), + ("text_line_count", serde_yaml::Value::Bool(true)), + ("text_line_max_len", serde_yaml::Value::Bool(true)), + ("text_line_mean_len", serde_yaml::Value::Bool(true)), + ("text_line_median_len", serde_yaml::Value::Bool(false)), + ]; + + for (key, value) in default_options { + if !base.options.contains_key(key) { + base.options.insert(key.to_string(), value); + } } // Get text_detect_size (previously max_buffer_size)