From 1bd15d849bc52b2f1a8162e680e3ebe1cdd0c924 Mon Sep 17 00:00:00 2001 From: many Date: Tue, 5 Oct 2021 18:52:14 +0200 Subject: [PATCH] Reduce candidates threshold --- http-ui/src/main.rs | 1 + milli/src/search/criteria/attribute.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/http-ui/src/main.rs b/http-ui/src/main.rs index 9efdd1371..27fc138dd 100644 --- a/http-ui/src/main.rs +++ b/http-ui/src/main.rs @@ -361,6 +361,7 @@ async fn main() -> anyhow::Result<()> { // We must use the write transaction of the update here. let mut wtxn = index_cloned.write_txn()?; let mut builder = update_builder.index_documents(&mut wtxn, &index_cloned); + builder.enable_autogenerate_docids(); match method.as_str() { "replace" => builder diff --git a/milli/src/search/criteria/attribute.rs b/milli/src/search/criteria/attribute.rs index 4c433ec28..6a7929eed 100644 --- a/milli/src/search/criteria/attribute.rs +++ b/milli/src/search/criteria/attribute.rs @@ -19,7 +19,7 @@ const LCM_10_FIRST_NUMBERS: u32 = 2520; /// Threshold on the number of candidates that will make /// the system to choose between one algorithm or another. -const CANDIDATES_THRESHOLD: u64 = 1000; +const CANDIDATES_THRESHOLD: u64 = 500; type FlattenedQueryTree = Vec>>;