mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
Make max_position_per_attributes changable
This commit is contained in:
parent
360c5ff3df
commit
c5a6075484
6 changed files with 31 additions and 1 deletions
|
@ -131,6 +131,11 @@ pub struct IndexerOpt {
|
|||
/// Number of parallel jobs for indexing, defaults to # of CPUs.
|
||||
#[structopt(long)]
|
||||
pub indexing_jobs: Option<usize>,
|
||||
|
||||
/// Maximum relative position in an attribute for a word to be indexed.
|
||||
/// Any value higher than 65535 will be clamped.
|
||||
#[structopt(long)]
|
||||
pub max_positions_per_attributes: Option<u32>,
|
||||
}
|
||||
|
||||
struct Highlighter<'a, A> {
|
||||
|
@ -346,6 +351,9 @@ async fn main() -> anyhow::Result<()> {
|
|||
if let Some(chunk_compression_level) = indexer_opt_cloned.chunk_compression_level {
|
||||
update_builder.chunk_compression_level(chunk_compression_level);
|
||||
}
|
||||
if let Some(max_pos_per_attributes) = indexer_opt_cloned.max_positions_per_attributes {
|
||||
update_builder.max_positions_per_attributes(max_pos_per_attributes);
|
||||
}
|
||||
update_builder.thread_pool(GLOBAL_THREAD_POOL.get().unwrap());
|
||||
update_builder.log_every_n(indexer_opt_cloned.log_every_n);
|
||||
update_builder.max_memory(indexer_opt_cloned.max_memory.get_bytes() as usize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue