List TODOs

This commit is contained in:
ManyTheFish 2023-11-23 14:43:52 +01:00
parent 84a36002d7
commit bddc168d83
3 changed files with 7 additions and 0 deletions

View File

@ -263,6 +263,7 @@ impl<'ctx> SearchContext<'ctx> {
word2: Interned<String>,
proximity: u8,
) -> Result<Option<RoaringBitmap>> {
// 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<String>,
proximity: u8,
) -> Result<Option<u64>> {
// 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<String>,
proximity: u8,
) -> Result<Option<RoaringBitmap>> {
// 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

View File

@ -52,6 +52,7 @@ pub(crate) fn data_from_obkv_documents(
dictionary: Option<&[&str]>,
max_positions_per_attributes: Option<u32>,
exact_attributes: HashSet<FieldId>,
// 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<grenad::Reader<BufReader<File>>>>(
docid_word_positions_chunks.clone(),
indexer,

View File

@ -127,6 +127,7 @@ pub struct Settings<'a, 't, 'i> {
max_values_per_facet: Setting<usize>,
sort_facet_values_by: Setting<HashMap<String, OrderBy>>,
pagination_max_total_hits: Setting<usize>,
// 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)?;
}