Hello, The "not_found" in the error indicates that the object was not found. When performing map / reduce operations, you have to take this into account. -- Luke Bakken Engineer lbak...@basho.com
On Mon, Mar 14, 2016 at 11:37 AM, Bartłomiej Górny <bar...@gorny.edu.pl> wrote: > Hi > > I've been trying to do fulltext search and mapreduce on it, only to get > values, and I can't make it work. When I try the following code: > > query = riak.mapreduce.RiakMapReduce(c) > query = query.search(idx, sstr) > query = query.map_values() > query = query.reduce_limit(1) > res = query.run() > > it failes, and gives me this: > > File > "/usr/local/lib/python2.7/dist-packages/riak-2.4.2-py2.7.egg/riak/mapreduce.py", > line 322, in run > riak.riak_error.RiakError: 'Error processing stream message: > exit:{json_encode, > {bad_term, > {not_found, > {{<<"default">>, <<"events">>}, > <<"1457605860_zeknmulfpt">>}, > {struct,[]}}}}:[{mochijson2, > json_encode,2 [{file,src/mochijson2.erl"}... > > where <<"1457605860_zeknmulfpt">> is a key of an existing object in > <<"events">> bucket, which can be fetched. > > The search itself works fine - when I do this: > > c.fulltext_search(idx, sstr, rows=10000) > > it works, and I can retrieve all found objects one by one. When I mapreduce > on a bucket: > > query = riak.mapreduce.RiakMapReduce(c) > query = query.add_bucket("track_here_events") > query = query.map_values() > query = query.reduce_limit(10) > res = query.run() > > it works too. Only combination of search and mapreduce works, though > according to documentation it should work. What may be wrong, then? > > Bartek > > -- > Młodość jest straszna; to scena, gdzie na wysokich koturnach i w > najrozmaitszych kostiumach poruszają się dzieci i recytują wyuczone kwestie, > które rozumieją tylko w połowie, ale którym są fanatycznie oddane. > > (Milan Kundera, "Żart") > > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com _______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com