diff --git a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs index 67270bc52..ac041a8b0 100644 --- a/milli/src/update/index_documents/extract/extract_docid_word_positions.rs +++ b/milli/src/update/index_documents/extract/extract_docid_word_positions.rs @@ -28,8 +28,8 @@ pub fn extract_docid_word_positions( indexer: GrenadParameters, searchable_fields: &Option>, stop_words: Option<&fst::Set<&[u8]>>, - allowed_separators: Option<&Vec<&str>>, - dictionary: Option<&Vec<&str>>, + allowed_separators: Option<&[&str]>, + dictionary: Option<&[&str]>, max_positions_per_attributes: Option, ) -> Result<(RoaringBitmap, grenad::Reader, ScriptLanguageDocidsMap)> { puffin::profile_function!(); @@ -55,10 +55,10 @@ pub fn extract_docid_word_positions( tokenizer_builder.stop_words(stop_words); } if let Some(dictionary) = dictionary { - tokenizer_builder.words_dict(dictionary.as_slice()); + tokenizer_builder.words_dict(dictionary); } if let Some(separators) = allowed_separators { - tokenizer_builder.separators(separators.as_slice()); + tokenizer_builder.separators(separators); } let tokenizer = tokenizer_builder.build(); diff --git a/milli/src/update/index_documents/extract/mod.rs b/milli/src/update/index_documents/extract/mod.rs index cec0d5814..4e174631c 100644 --- a/milli/src/update/index_documents/extract/mod.rs +++ b/milli/src/update/index_documents/extract/mod.rs @@ -49,8 +49,8 @@ pub(crate) fn data_from_obkv_documents( geo_fields_ids: Option<(FieldId, FieldId)>, vectors_field_id: Option, stop_words: Option>, - allowed_separators: Option>, - dictionary: Option>, + allowed_separators: Option<&[&str]>, + dictionary: Option<&[&str]>, max_positions_per_attributes: Option, exact_attributes: HashSet, ) -> Result<()> { @@ -293,8 +293,8 @@ fn send_and_extract_flattened_documents_data( geo_fields_ids: Option<(FieldId, FieldId)>, vectors_field_id: Option, stop_words: &Option>, - allowed_separators: &Option>, - dictionary: &Option>, + allowed_separators: &Option<&[&str]>, + dictionary: &Option<&[&str]>, max_positions_per_attributes: Option, ) -> Result<( grenad::Reader, @@ -350,8 +350,8 @@ fn send_and_extract_flattened_documents_data( indexer, searchable_fields, stop_words.as_ref(), - allowed_separators.as_ref(), - dictionary.as_ref(), + *allowed_separators, + *dictionary, max_positions_per_attributes, )?; diff --git a/milli/src/update/index_documents/mod.rs b/milli/src/update/index_documents/mod.rs index 5426e26db..0dae611c9 100644 --- a/milli/src/update/index_documents/mod.rs +++ b/milli/src/update/index_documents/mod.rs @@ -359,8 +359,8 @@ where geo_fields_ids, vectors_field_id, stop_words, - separators, - dictionary, + separators.as_ref().map(Vec::as_slice), + dictionary.as_ref().map(Vec::as_slice), max_positions_per_attributes, exact_attributes, )