chore: add docs of flattened structs

This commit is contained in:
Jérome Eertmans 2022-10-06 15:14:56 +02:00
parent 8c526c31da
commit abb0233077

View File

@ -17,7 +17,7 @@ const DEFAULT_LOG_EVERY_N: usize = 100000;
#[derive(Debug, Clone, Parser, Serialize, Deserialize)] #[derive(Debug, Clone, Parser, Serialize, Deserialize)]
#[serde(rename_all = "snake_case", deny_unknown_fields)] #[serde(rename_all = "snake_case", deny_unknown_fields)]
pub struct IndexerOpts { pub struct IndexerOpts {
/// The amount of documents to skip before printing /// Sets the amount of documents to skip before printing
/// a log regarding the indexing advancement. /// a log regarding the indexing advancement.
#[serde(skip_serializing, default = "default_log_every_n")] #[serde(skip_serializing, default = "default_log_every_n")]
#[clap(long, default_value_t = default_log_every_n(), hide = true)] // 100k #[clap(long, default_value_t = default_log_every_n(), hide = true)] // 100k
@ -28,20 +28,15 @@ pub struct IndexerOpts {
#[clap(long, hide = true)] #[clap(long, hide = true)]
pub max_nb_chunks: Option<usize>, pub max_nb_chunks: Option<usize>,
/// The maximum amount of memory the indexer will use. /// Sets the maximum amount of RAM Meilisearch can use when indexing. By default, Meilisearch
/// /// uses no more than two thirds of available memory.
/// In case the engine is unable to retrieve the available memory the engine will
/// try to use the memory it needs but without real limit, this can lead to
/// Out-Of-Memory issues and it is recommended to specify the amount of memory to use.
#[clap(long, env = MEILI_MAX_INDEXING_MEMORY, default_value_t)] #[clap(long, env = MEILI_MAX_INDEXING_MEMORY, default_value_t)]
#[serde(default)] #[serde(default)]
pub max_indexing_memory: MaxMemory, pub max_indexing_memory: MaxMemory,
/// The maximum number of threads the indexer will use. /// Sets the maximum number of threads Meilisearch can use during indexation. By default, the
/// If the number set is higher than the real number of cores available in the machine, /// indexer avoids using more than half of a machine's total processing units. This ensures
/// it will use the maximum number of available cores. /// Meilisearch is always ready to perform searches, even while you are updating an index.
///
/// It defaults to half of the available threads.
#[clap(long, env = MEILI_MAX_INDEXING_THREADS, default_value_t)] #[clap(long, env = MEILI_MAX_INDEXING_THREADS, default_value_t)]
#[serde(default)] #[serde(default)]
pub max_indexing_threads: MaxThreads, pub max_indexing_threads: MaxThreads,
@ -50,8 +45,7 @@ pub struct IndexerOpts {
#[derive(Debug, Clone, Parser, Default, Serialize, Deserialize)] #[derive(Debug, Clone, Parser, Default, Serialize, Deserialize)]
#[serde(rename_all = "snake_case", deny_unknown_fields)] #[serde(rename_all = "snake_case", deny_unknown_fields)]
pub struct SchedulerConfig { pub struct SchedulerConfig {
/// The engine will disable task auto-batching, /// Deactivates auto-batching when provided.
/// and will sequencialy compute each task one by one.
#[clap(long, env = DISABLE_AUTO_BATCHING)] #[clap(long, env = DISABLE_AUTO_BATCHING)]
#[serde(default)] #[serde(default)]
pub disable_auto_batching: bool, pub disable_auto_batching: bool,