(cloud) Saving things now update the search index

This commit is contained in:
2023-05-04 21:23:09 -07:00
parent 4e7e19da97
commit 14156e6ced
6 changed files with 71 additions and 38 deletions

View File

@@ -28,7 +28,8 @@
[clojure.tools.logging :as log]
[com.brunobonacci.mulog :as mu]
[datomic.api :as dc]
[iol-ion.tx :refer [random-tempid]])
[iol-ion.tx :refer [random-tempid]]
[auto-ap.solr :as solr])
(:import
(org.apache.commons.codec.binary Base64)))
@@ -531,7 +532,8 @@
#_(log/info (map :tx success))
(mu/trace ::success-tx
[:count (count success)]
(audit-transact-batch (map :tx success) (:id context)))
(doseq [n (:tempids (audit-transact-batch (map :tx success) (:id context)))]
(solr/touch n)))
{:successful (map (fn [x] {:external_id (:external_id x)}) success)
:ignored (map (fn [x]