Update this test
This commit is contained in:
parent
4b417ec15a
commit
413d4484b8
1 changed files with 2 additions and 4 deletions
|
|
@ -12,20 +12,18 @@
|
|||
|
||||
(defn enable-search
|
||||
[f]
|
||||
(is (ok? (cmd/admin-command {:setParameter "*" :textSearchEnabled true})))
|
||||
(is (ok? (cmd/admin-command (array-map :textSearchEnabled true :setParameter "*"))))
|
||||
(f))
|
||||
|
||||
(use-fixtures :each purge-docs)
|
||||
(use-fixtures :once enable-search)
|
||||
|
||||
(deftest ^{:edge-features true :search true} test-basic-full-text-search-query
|
||||
(deftest ^{:search true} test-basic-full-text-search-query
|
||||
(let [coll "docs"]
|
||||
(mc/ensure-index coll (array-map :subject "text" :content "text"))
|
||||
(mc/insert coll {:subject "hello there" :content "this should be searchable"})
|
||||
(mc/insert coll {:subject "untitled" :content "this is just noize"})
|
||||
(let [res (ms/search coll "hello")
|
||||
xs (ms/results-from res)]
|
||||
(is (ok? res))
|
||||
(println res)
|
||||
(is (= "hello there" (-> xs first :obj :subject)))
|
||||
(is (= 1.0 (-> xs first :score))))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue