Skip to content

Instantly share code, notes, and snippets.

@reiddraper
Created December 31, 2011 04:27
Show Gist options
  • Save reiddraper/1542875 to your computer and use it in GitHub Desktop.
Save reiddraper/1542875 to your computer and use it in GitHub Desktop.
sumo querying ideas
; 2i queries
(index-query conn :age 25)
(index-query conn :age 21 80)
(index-query conn :last-name "a" "f")
; is it too much of an abstraction to launch
; a mapreduce query which gets the docs and not
; just the keys?
(index-query conn :email "foo@example.com" :return-body true)
; map reduce calls start with an input, then
; a vector of map or reduce funcs
(mapreduce conn (:index :age 21 80)
[(:javascript "function (obj) {...}")
(:built-in "reduce_sort")]))
; links
; starts with a bucket/key
; and then a list of bucket/link-tags
; specs
(link-walk conn "bucket" "key"
[("other-bucket" "tag1" :keep true)
("second-bucket" "tag2")])
@reiddraper
Copy link
Author

@bretthoerner, what do you think about these options for identifying language/func-type?

; named funcs
(map/js "func")
(reduce/js "func")

; keywords
(:map-js "function () {...}")
(:reduce-builtin "reduce_sort")

; hash
{:lang :js :type :map :src "function () {...}"}

@reiddraper
Copy link
Author

I created issue #9 for mapreduce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment