stop updating the fields ids map when fields are only swapped

This commit is contained in:
Tamo 2024-05-13 16:49:08 +02:00
parent 9ecde41853
commit b0afe0972e
2 changed files with 17 additions and 13 deletions

View file

@ -2662,17 +2662,18 @@ pub(crate) mod tests {
settings.set_filterable_fields(HashSet::from([S("age")]));
})
.unwrap();
// The order of the field id map shouldn't change
db_snap!(index, fields_ids_map, @r###"
0 name |
1 realName |
2 id |
3 age |
1 id |
2 age |
3 realName |
"###);
db_snap!(index, searchable_fields, @r###"["name", "realName"]"###);
db_snap!(index, fieldids_weights_map, @r###"
fid weight
0 0 |
1 1 |
3 1 |
"###);
}
}