use crate::prelude::*;
use cloudillo_core::settings::types::{
PermissionLevel, SettingDefinition, SettingScope, SettingValue, SettingsRegistry,
};
pub fn register_settings(registry: &mut SettingsRegistry) -> ClResult<()> {
registry.register(
SettingDefinition::builder("search.store_text")
.description(
"Store the extracted plain text of documents and actions alongside the search \
index. Full-text search works either way; turning this off drops the stored copy \
to save disk, at the cost of highlighted result snippets. Changing it requires a \
reindex (POST /api/search/reindex).",
)
.default(SettingValue::Bool(true))
.scope(SettingScope::Tenant)
.permission(PermissionLevel::User)
.build()?,
)?;
Ok(())
}