mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-04-18 07:57:59 +02:00
kickstart new settings indexer
This commit is contained in:
parent
db3017491f
commit
ef5ffa78d0
@ -25,6 +25,7 @@ use crate::index::{
|
||||
DEFAULT_MIN_WORD_LEN_TWO_TYPOS,
|
||||
};
|
||||
use crate::order_by_map::OrderByMap;
|
||||
use crate::progress::Progress;
|
||||
use crate::prompt::default_max_bytes;
|
||||
use crate::proximity::ProximityPrecision;
|
||||
use crate::update::index_documents::IndexDocumentsMethod;
|
||||
@ -1271,6 +1272,66 @@ impl<'a, 't, 'i> Settings<'a, 't, 'i> {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn new_execute<'indexer, MSP>(
|
||||
mut self,
|
||||
must_stop_processing: &'indexer MSP,
|
||||
progress: &'indexer Progress,
|
||||
) -> Result<()>
|
||||
where
|
||||
MSP: Fn() -> bool + Sync,
|
||||
{
|
||||
// force the old indexer if the environment says so
|
||||
if std::env::var_os("MEILI_EXPERIMENTAL_NO_EDITION_2024_FOR_SETTINGS").is_some() {
|
||||
return self.execute(
|
||||
|indexing_step| tracing::debug!("update: {:?}", indexing_step),
|
||||
must_stop_processing,
|
||||
);
|
||||
}
|
||||
|
||||
// only use the new indexer when only the embedder possibly changed
|
||||
if let Self {
|
||||
searchable_fields: Setting::NotSet,
|
||||
displayed_fields: Setting::NotSet,
|
||||
filterable_fields: Setting::NotSet,
|
||||
sortable_fields: Setting::NotSet,
|
||||
criteria: Setting::NotSet,
|
||||
stop_words: Setting::NotSet,
|
||||
non_separator_tokens: Setting::NotSet,
|
||||
separator_tokens: Setting::NotSet,
|
||||
dictionary: Setting::NotSet,
|
||||
distinct_field: Setting::NotSet,
|
||||
synonyms: Setting::NotSet,
|
||||
primary_key: Setting::NotSet,
|
||||
authorize_typos: Setting::NotSet,
|
||||
min_word_len_two_typos: Setting::NotSet,
|
||||
min_word_len_one_typo: Setting::NotSet,
|
||||
exact_words: Setting::NotSet,
|
||||
exact_attributes: Setting::NotSet,
|
||||
max_values_per_facet: Setting::NotSet,
|
||||
sort_facet_values_by: Setting::NotSet,
|
||||
pagination_max_total_hits: Setting::NotSet,
|
||||
proximity_precision: Setting::NotSet,
|
||||
embedder_settings: _,
|
||||
search_cutoff: Setting::NotSet,
|
||||
localized_attributes_rules: Setting::NotSet,
|
||||
prefix_search: Setting::NotSet,
|
||||
facet_search: Setting::NotSet,
|
||||
wtxn: _,
|
||||
index: _,
|
||||
indexer_config: _,
|
||||
} = &self
|
||||
{
|
||||
todo!()
|
||||
} else {
|
||||
self.execute(
|
||||
|indexing_step| tracing::debug!("update: {:?}", indexing_step),
|
||||
must_stop_processing,
|
||||
)
|
||||
}
|
||||
|
||||
// create rtxn, populate FieldIdMapWithMetadata (old + new)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InnerIndexSettingsDiff {
|
||||
|
Loading…
x
Reference in New Issue
Block a user