Skip to content

Commit

Permalink
Improve ranked search
Browse files Browse the repository at this point in the history
  • Loading branch information
wardle committed Oct 18, 2024
1 parent 4ae1b1a commit 1a33bb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/com/eldrix/hermes/impl/search.clj
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,10 @@ items."
[searcher {:keys [s fuzzy query] :as params}]
(let [q1 (make-ranked-search-tokens-query "nterm" s fuzzy)
q2 (if query (q-and [q1 query]) q1)]
(do-search searcher (-> params
(assoc :boost-length? false)
(do-search searcher (-> params ;; alter original parameters to use internal API to do ranked search, not autocompletion
(dissoc :s)
(assoc :query q2)))))
(assoc :boost-length? false
:query q2)))))

(defn q-self
"Returns a query that will only return documents for the concept specified."
Expand Down

0 comments on commit 1a33bb3

Please sign in to comment.