move identifier from settings to index; fix #470

This commit is contained in:
qdequele 2020-02-12 17:00:14 +01:00
parent dc9ca2ebc9
commit 4986adc186
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
8 changed files with 193 additions and 69 deletions

View file

@ -89,7 +89,7 @@ pub fn apply_settings_update(
must_reindex = true;
},
UpdateState::Nothing => (),
};
}
match settings.displayed_attributes.clone() {
UpdateState::Update(v) => schema.update_displayed(v)?,
UpdateState::Clear => {
@ -97,11 +97,6 @@ pub fn apply_settings_update(
schema.update_displayed(clear)?;
},
UpdateState::Nothing => (),
};
if let UpdateState::Update(v) = settings.identifier.clone() {
schema.set_identifier(v.as_ref())?;
must_reindex = true;
}
index.main.put_schema(writer, &schema)?;
@ -130,9 +125,6 @@ pub fn apply_settings_update(
reindex_all_documents(writer, index)?;
}
if let UpdateState::Clear = settings.identifier {
index.main.delete_schema(writer)?;
}
Ok(())
}