Fwd: Possible bug in Python client?

2014-06-25 Thread Alex De la rosa
** 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
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Possible bug in Python client?

2014-06-25 Thread Alex De la rosa
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():

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

Thanks,
Alex
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com