Fix a typo in a variable

Co-authored-by: Louis Dureuil <louis@meilisearch.com>

aaa
This commit is contained in:
Clément Renault 2023-03-09 13:01:43 +01:00
parent b1d61f5a02
commit e106b16148
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -95,14 +95,14 @@ pub fn extract_fid_docid_facet_values<R: io::Read + io::Seek>(
for (normalized, original) in
strings.into_iter().filter(|(n, _)| !n.is_empty())
{
let normalised_truncated_value: String = normalized
let normalized_truncated_value: String = normalized
.char_indices()
.take_while(|(idx, _)| idx + 4 < MAX_FACET_VALUE_LENGTH)
.map(|(_, c)| c)
.collect();
key_buffer.truncate(size_of::<FieldId>() + size_of::<DocumentId>());
key_buffer.extend_from_slice(normalised_truncated_value.as_bytes());
key_buffer.extend_from_slice(normalized_truncated_value.as_bytes());
fid_docid_facet_strings_sorter
.insert(&key_buffer, original.as_bytes())?;
}