From acdb10a3076f07a7a22d6a40da323f0fae4e3389 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Mon, 21 Mar 2022 10:55:15 +0100 Subject: [PATCH] Remove some useless indexer options --- meilisearch-http/tests/common/server.rs | 1 - meilisearch-lib/src/options.rs | 15 +-------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/meilisearch-http/tests/common/server.rs b/meilisearch-http/tests/common/server.rs index 9a94085a4..7a2b0da86 100644 --- a/meilisearch-http/tests/common/server.rs +++ b/meilisearch-http/tests/common/server.rs @@ -7,7 +7,6 @@ use actix_web::http::StatusCode; use byte_unit::{Byte, ByteUnit}; use meilisearch_auth::AuthController; use meilisearch_http::setup_meilisearch; -use meilisearch_lib::options::{IndexerOpts, MaxMemory}; use once_cell::sync::Lazy; use serde_json::Value; use tempfile::TempDir; diff --git a/meilisearch-lib/src/options.rs b/meilisearch-lib/src/options.rs index e04396627..12f0c0a12 100644 --- a/meilisearch-lib/src/options.rs +++ b/meilisearch-lib/src/options.rs @@ -3,7 +3,7 @@ use std::{convert::TryFrom, ops::Deref, str::FromStr}; use byte_unit::{Byte, ByteError}; use clap::Parser; -use milli::{update::IndexerConfig, CompressionType}; +use milli::update::IndexerConfig; use serde::Serialize; use sysinfo::{RefreshKind, System, SystemExt}; @@ -28,17 +28,6 @@ pub struct IndexerOpts { #[clap(long, default_value_t)] 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, - /// Number of parallel jobs for indexing, defaults to # of CPUs. #[clap(long)] pub indexing_jobs: Option, @@ -81,8 +70,6 @@ impl TryFrom<&IndexerOpts> for IndexerConfig { log_every_n: Some(other.log_every_n), max_nb_chunks: other.max_nb_chunks, 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), max_positions_per_attributes: None, ..Default::default()