fix distinct attribute behavior

This commit is contained in:
mpostma
2020-06-16 10:45:17 +02:00
parent 60a90e96f3
commit 8035ca7138
4 changed files with 22 additions and 19 deletions

View File

@ -59,7 +59,8 @@ pub fn apply_settings_update(
match settings.distinct_attribute {
UpdateState::Update(v) => {
index.main.put_distinct_attribute(writer, &v)?;
let field_id = schema.insert(&v)?;
index.main.put_distinct_attribute(writer, field_id)?;
},
UpdateState::Clear => {
index.main.delete_distinct_attribute(writer)?;