:group_level query parameter for couchdb view

33 views
Skip to first unread message

David

unread,
May 14, 2012, 4:21:35 PM5/14/12
to Clojure Clutch
Hey Guys,
I am using clojure clutch (0.4.0-SNAPSHOT) for my clojure web app.
Everything has run smoothly so far, but I'm experiencing an issue when
I query a design doc with the :group_level parameter. Here's my query:

(get-view "regatta-view" "events" {:group_level 1 :key
["ReggataKeyHere"]})

I am getting an empty list back from CouchDB, even though when I check
on Futon I know the list should contain items.

"regatta-view" is the name of my design doc, and "events" is the view
key. I have confirmed that if I remove the query params map then I get
everything that my map function returns, as expected.

Also, this DOES work and returns the correct items:
(get-view "regatta-view" "events" {:group_level 2 :key
["ReggataKeyHere" "Level2keyhere"]})

I only have 2 levels, so it appears that its just putting in :group
true and ignoring the actual level that I want.

Any ideas? I may be missing something here...

Thanks
-David

David

unread,
May 14, 2012, 4:27:32 PM5/14/12
to Clojure Clutch
One other thing, if I change the :group_level to 1, yet keep the keep
the key for the 2nd group level, it still works. This again leads me
to believe that it may not be looking at what group level I specify.

Heres the request:

(get-view "regatta-view" "events" {:group_level 1 :key
["ReggataKeyHere" "Level2keyhere"]})
Reply all
Reply to author
Forward
0 new messages