From bddc168d837929f79c981315a16eeaff8c96c03d Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Thu, 23 Nov 2023 14:43:52 +0100 Subject: [PATCH] List TODOs --- milli/src/search/new/db_cache.rs | 3 +++ milli/src/update/index_documents/extract/mod.rs | 2 ++ milli/src/update/settings.rs | 2 ++ 3 files changed, 7 insertions(+) diff --git a/milli/src/search/new/db_cache.rs b/milli/src/search/new/db_cache.rs index 24c7d5076..b7a74fb62 100644 --- a/milli/src/search/new/db_cache.rs +++ b/milli/src/search/new/db_cache.rs @@ -263,6 +263,7 @@ impl<'ctx> SearchContext<'ctx> { word2: Interned, proximity: u8, ) -> Result> { + // TODO: if database is empty, search if the word are in the same attribute instead DatabaseCache::get_value::<_, _, CboRoaringBitmapCodec>( self.txn, (proximity, word1, word2), @@ -282,6 +283,7 @@ impl<'ctx> SearchContext<'ctx> { word2: Interned, proximity: u8, ) -> Result> { + // TODO: if database is empty, search if the word are in the same attribute instead DatabaseCache::get_value::<_, _, CboRoaringBitmapLenCodec>( self.txn, (proximity, word1, word2), @@ -301,6 +303,7 @@ impl<'ctx> SearchContext<'ctx> { prefix2: Interned, proximity: u8, ) -> Result> { + // TODO: if database is empty, search if the word are in the same attribute instead let docids = match self .db_cache .word_prefix_pair_proximity_docids diff --git a/milli/src/update/index_documents/extract/mod.rs b/milli/src/update/index_documents/extract/mod.rs index 91f3e1c62..366e61c04 100644 --- a/milli/src/update/index_documents/extract/mod.rs +++ b/milli/src/update/index_documents/extract/mod.rs @@ -52,6 +52,7 @@ pub(crate) fn data_from_obkv_documents( dictionary: Option<&[&str]>, max_positions_per_attributes: Option, exact_attributes: HashSet, + // TODO: add a proximity database deactivation parameter. ) -> Result<()> { puffin::profile_function!(); @@ -150,6 +151,7 @@ pub(crate) fn data_from_obkv_documents( }); } + // TODO: Skip this part if deactivated spawn_extraction_task::<_, _, Vec>>>( docid_word_positions_chunks.clone(), indexer, diff --git a/milli/src/update/settings.rs b/milli/src/update/settings.rs index 98697325e..0a069c6df 100644 --- a/milli/src/update/settings.rs +++ b/milli/src/update/settings.rs @@ -127,6 +127,7 @@ pub struct Settings<'a, 't, 'i> { max_values_per_facet: Setting, sort_facet_values_by: Setting>, pagination_max_total_hits: Setting, + // TODO: add a proximity database deactivation attribute. } impl<'a, 't, 'i> Settings<'a, 't, 'i> { @@ -906,6 +907,7 @@ impl<'a, 't, 'i> Settings<'a, 't, 'i> { || synonyms_updated || searchable_updated || exact_attributes_updated + // TODO: reindex if proximity database is activated { self.reindex(&progress_callback, &should_abort, old_fields_ids_map)?; }