makes requirement of exact match.
This commit is contained in:
@@ -121,6 +121,16 @@
|
||||
first)]
|
||||
(or fuzzy-match client-word-match))))
|
||||
|
||||
(defn exact-match
|
||||
([clients invoice-client-name]
|
||||
(->> clients
|
||||
(filter (fn [{:keys [:client/matches :client/name] :as client :or {matches []}}]
|
||||
(seq
|
||||
(filter (fn [m]
|
||||
(= (.toLowerCase invoice-client-name) (.toLowerCase m)))
|
||||
(conj matches name)))))
|
||||
first)))
|
||||
|
||||
(defn best-location-match [client text full-text]
|
||||
(or (->> client
|
||||
:client/location-matches
|
||||
|
||||
Reference in New Issue
Block a user