mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
parent
ac7226bb27
commit
1639a7338d
6 changed files with 115 additions and 21 deletions
|
@ -201,12 +201,14 @@ pub fn apply_addition<'a, 'b>(
|
|||
};
|
||||
|
||||
let old_document = Option::<HashMap<String, Value>>::deserialize(&mut deserializer)?;
|
||||
println!("old document: {:#?}", old_document);
|
||||
if let Some(old_document) = old_document {
|
||||
for (key, value) in old_document {
|
||||
document.entry(key).or_insert(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
println!("new document: {:#?}", document);
|
||||
documents_additions.insert(internal_docid, document);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ pub fn index_value<A>(
|
|||
) -> Option<usize>
|
||||
where A: AsRef<[u8]>,
|
||||
{
|
||||
println!("indexing value: {}", value);
|
||||
match value {
|
||||
Value::Null => None,
|
||||
Value::Bool(boolean) => {
|
||||
|
|
|
@ -70,9 +70,11 @@ pub fn apply_settings_update(
|
|||
|
||||
match settings.searchable_attributes.clone() {
|
||||
UpdateState::Update(v) => {
|
||||
println!("updating indexed attributes");
|
||||
if v.iter().any(|e| e == "*") || v.is_empty() {
|
||||
schema.set_all_fields_as_indexed();
|
||||
} else {
|
||||
println!("updating indexed");
|
||||
schema.update_indexed(v)?;
|
||||
}
|
||||
must_reindex = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue