[Python client] combining mapreduce with riak search

skydelta98 skydelta98 at gmail.com
Mon Jun 2 14:50:25 EDT 2014


I am trying to apply a mapreduce query after doing a full document seach on
the bucket:

 client = riak.RiakClient(protocol='http', host='xx.xx.xx.xx',
s = client.fulltext_search('tweets', 'campaign_id:3')
s.map("""function(v) { var data = JSON.parse(v.values[0].data);
if(data.tweet.match(/GS/i)) { return [[v.key, data]]; } return []; }""") 

i followd this appoach as specified in this tutorial:

the problem is the code i pasted below willl not work , simply because the
method fulltext_search will return a dictionnary , how could i apply a
map/reduce query from the result of a fulltext search ?

and thanks for you help

View this message in context: http://riak-users.197444.n3.nabble.com/Python-client-combining-mapreduce-with-riak-search-tp4031182.html
Sent from the Riak Users mailing list archive at Nabble.com.

More information about the riak-users mailing list