Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Better function names

  • Loading branch information...
commit 826a1b4a80f952e94c0d594a7150209d17e9d3a8 1 parent cb62320
@michaelklishin michaelklishin authored
View
6 src/clojurewerkz/elastisch/rest/percolation.clj
@@ -6,13 +6,13 @@
;; API
;;
-(defn register
+(defn register-query
"Registers a percolator for the given index"
[index percolator & {:as options}]
(rest/put (rest/percolator-url index percolator) :body options))
-(defn unregister
- "Unregisters a percolator for the given index"
+(defn unregister-query
+ "Unregisters a percolator query for the given index"
[index percolator]
(rest/delete (rest/percolator-url index percolator)))
View
4 test/clojurewerkz/elastisch/rest_api/percolation_test.clj
@@ -13,9 +13,9 @@
(deftest ^{:percolation true} test-percolation-case-1
(let [index-name "articles"
percolator "article"
- result1 (pcl/register index-name percolator :query {:term {:title "search"}})
+ result1 (pcl/register-query index-name percolator :query {:term {:title "search"}})
result2 (pcl/percolate index-name percolator :doc {:title "You know, for search"})]
(is (ok? result1))
(is (ok? result2))
(is (= ["article"] (matches-from result2)))
- (is (ok? (pcl/unregister index-name percolator)))))
+ (is (ok? (pcl/unregister-query index-name percolator)))))
Please sign in to comment.
Something went wrong with that request. Please try again.