From 5d3b75dc10c536e02d60a46407ce2726e0fc6c42 Mon Sep 17 00:00:00 2001 From: "Hugh A. Cayless" Date: Thu, 21 Sep 2023 20:31:33 -0400 Subject: [PATCH] Slow down indexing and use smaller batches. --- pn-indexer/src/info/papyri/indexer.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pn-indexer/src/info/papyri/indexer.clj b/pn-indexer/src/info/papyri/indexer.clj index e778bbad..82ca55c0 100644 --- a/pn-indexer/src/info/papyri/indexer.clj +++ b/pn-indexer/src/info/papyri/indexer.clj @@ -1058,14 +1058,14 @@ [] (dosync (ref-set solr (let [cb (ConcurrentUpdateSolrClient$Builder. (str solrurl "pn-search/"))] - (-> cb (.withQueueSize 500) - (.withThreadCount nthreads) + (-> cb (.withQueueSize 50) + (.withThreadCount 1) (.build)))) (.setRequestWriter @solr (BinaryRequestWriter.))) ;; Index docs queued in @text (println "Indexing text...") - (let [pool (Executors/newFixedThreadPool nthreads) + (let [pool (Executors/newFixedThreadPool 1) tasks (map (fn [x] (fn []