From ae4f49cfc0492eae109f2671d7bd050a12a8e291 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Fri, 29 Dec 2023 21:40:02 +0200 Subject: [PATCH] init: interpret batch-size 0 as 'default' This makes writing tests easier. --- man/mu-init.1.org | 7 ++++--- mu/mu-cmd-init.cc | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/man/mu-init.1.org b/man/mu-init.1.org index 653afac5..60509165 100644 --- a/man/mu-init.1.org +++ b/man/mu-init.1.org @@ -55,12 +55,13 @@ number of changes after which they are committed to the database; decreasing this reduces the memory requirements, but make indexing substantially slows (and vice-versa for increasing). Usually, the default of 250000 should be fine. +Batch-size 0 is interpreted as 'use the default'. + ** --support-ngrams whether to enable support for using ngrams in indexing and query parsing; this -can be useful for languages without explicit word-breaks, such as -Chinese/Japanes/Korean. See *NGRAM SUPPORT* below. - +can be useful for languages without explicit word breaks, such as +Chinese/Japanese/Korean. See *NGRAM SUPPORT* below. ** --reinit diff --git a/mu/mu-cmd-init.cc b/mu/mu-cmd-init.cc index 2bbbd915..51769c00 100644 --- a/mu/mu-cmd-init.cc +++ b/mu/mu-cmd-init.cc @@ -49,7 +49,7 @@ Mu::mu_cmd_init(const Options& opts) if (opts.init.max_msg_size) conf.set(*opts.init.max_msg_size); - if (opts.init.batch_size) + if (opts.init.batch_size && *opts.init.batch_size != 0) conf.set(*opts.init.batch_size); if (!opts.init.my_addresses.empty()) conf.set(opts.init.my_addresses);