integrate the new Settings in the dumps

This commit is contained in:
tamo 2021-05-10 20:48:06 +02:00
parent d767990424
commit 7d748fa384
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
5 changed files with 16 additions and 13 deletions

View file

@ -8,7 +8,7 @@ use serde_json::{Map, Value};
use crate::helpers::EnvSizer;
pub use search::{SearchQuery, SearchResult, DEFAULT_SEARCH_LIMIT};
pub use updates::{Facets, Settings, Checked, Unchecked, UpdateResult};
pub use updates::{Facets, Settings, Checked, Unchecked};
use serde::{de::Deserializer, Deserialize};
mod search;

View file

@ -8,9 +8,10 @@ use log::info;
use milli::update::{IndexDocumentsMethod, UpdateBuilder, UpdateFormat};
use serde::{Deserialize, Serialize};
use super::{deserialize_some, Index};
use crate::index_controller::UpdateResult;
use super::{deserialize_some, Index};
#[derive(Clone, Default, Debug)]
pub struct Checked;
@ -35,7 +36,11 @@ pub struct Settings<T> {
)]
pub searchable_attributes: Option<Option<Vec<String>>>,
#[serde(default)]
#[serde(
default,
deserialize_with = "deserialize_some",
skip_serializing_if = "Option::is_none"
)]
pub attributes_for_faceting: Option<Option<HashMap<String, String>>>,
#[serde(