Skip to content

Commit

Permalink
Slow down indexing and use smaller batches.
Browse files Browse the repository at this point in the history
  • Loading branch information
hcayless committed Sep 22, 2023
1 parent a2eabc4 commit 5d3b75d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pn-indexer/src/info/papyri/indexer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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 []
Expand Down

0 comments on commit 5d3b75d

Please sign in to comment.