Permalink
Browse files

Better function names

  • Loading branch information...
1 parent cb62320 commit 826a1b4a80f952e94c0d594a7150209d17e9d3a8 @michaelklishin michaelklishin committed Sep 10, 2012
@@ -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)))
@@ -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)))))

0 comments on commit 826a1b4

Please sign in to comment.