Fwd: Possible bug in Python client?

Alex De la rosa alex.rosa.box at gmail.com
Wed Jun 25 09:31:19 EDT 2014


** SORRY, WAS SEND BEFORE I FINISHED **

Hi there,

I was testing 2i via PBC on Python and I found a wrong behaviour, this is
my code:

-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------

import riak
client = riak.RiakClient(protocol='pbc',
nodes=[{'host':'127.0.0.1','http_port':8098,'pb_port':8087}])
bucket = client.bucket('accounts')
key = bucket.new('alex', data={"name":"Alex","age":25,"sex":"male"})
key.add_index('age_int', 25)
key.add_index('sex_bin', 'male')
key.store()
results = bucket.get_index('sex_bin', 'male', max_results = 10)
print results.results
if results.has_next_page():
    more = bucket.get_index('sex_bin', 'm', 'o', max_results = 10,
continuation = results.continuation)
    print more.results

-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------

This is the output:
['alex']
['alex']

Although there is only 1 key that matches the 2i, results.has_next_page()
has value TRUE and results.continuation is empty... however, it enter the
IF and requests more keys getting "alex" key again (and that could be on
and on and on)

Thanks,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20140625/2b115d11/attachment.html>


More information about the riak-users mailing list