Remove some useless indexer options

This commit is contained in:
Kerollmops 2022-03-21 10:55:15 +01:00
parent 8fecc6238d
commit acdb10a307
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
2 changed files with 1 additions and 15 deletions

View File

@ -7,7 +7,6 @@ use actix_web::http::StatusCode;
use byte_unit::{Byte, ByteUnit}; use byte_unit::{Byte, ByteUnit};
use meilisearch_auth::AuthController; use meilisearch_auth::AuthController;
use meilisearch_http::setup_meilisearch; use meilisearch_http::setup_meilisearch;
use meilisearch_lib::options::{IndexerOpts, MaxMemory};
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use serde_json::Value; use serde_json::Value;
use tempfile::TempDir; use tempfile::TempDir;

View File

@ -3,7 +3,7 @@ use std::{convert::TryFrom, ops::Deref, str::FromStr};
use byte_unit::{Byte, ByteError}; use byte_unit::{Byte, ByteError};
use clap::Parser; use clap::Parser;
use milli::{update::IndexerConfig, CompressionType}; use milli::update::IndexerConfig;
use serde::Serialize; use serde::Serialize;
use sysinfo::{RefreshKind, System, SystemExt}; use sysinfo::{RefreshKind, System, SystemExt};
@ -28,17 +28,6 @@ pub struct IndexerOpts {
#[clap(long, default_value_t)] #[clap(long, default_value_t)]
pub max_memory: MaxMemory, pub max_memory: MaxMemory,
/// The name of the compression algorithm to use when compressing intermediate
/// Grenad chunks while indexing documents.
///
/// Choosing a fast algorithm will make the indexing faster but may consume more memory.
#[clap(long, default_value = "snappy", possible_values = &["snappy", "zlib", "lz4", "lz4hc", "zstd"])]
pub chunk_compression_type: CompressionType,
/// The level of compression of the chosen algorithm.
#[clap(long, requires = "chunk-compression-type")]
pub chunk_compression_level: Option<u32>,
/// Number of parallel jobs for indexing, defaults to # of CPUs. /// Number of parallel jobs for indexing, defaults to # of CPUs.
#[clap(long)] #[clap(long)]
pub indexing_jobs: Option<usize>, pub indexing_jobs: Option<usize>,
@ -81,8 +70,6 @@ impl TryFrom<&IndexerOpts> for IndexerConfig {
log_every_n: Some(other.log_every_n), log_every_n: Some(other.log_every_n),
max_nb_chunks: other.max_nb_chunks, max_nb_chunks: other.max_nb_chunks,
max_memory: (*other.max_memory).map(|b| b.get_bytes() as usize), max_memory: (*other.max_memory).map(|b| b.get_bytes() as usize),
chunk_compression_type: other.chunk_compression_type,
chunk_compression_level: other.chunk_compression_level,
thread_pool: Some(thread_pool), thread_pool: Some(thread_pool),
max_positions_per_attributes: None, max_positions_per_attributes: None,
..Default::default() ..Default::default()