Question about counters

Alex De la rosa alex.rosa.box at gmail.com
Tue Jul 1 04:38:56 EDT 2014


Hi there,

I found out why Riak was not starting when I enabled it... JAVA was not
installed!!... However, after installing Java and successfully started Riak
with search enabled, when trying to use "search" it crashes very badly,
this is the Java Version I have under Ubuntu Server 14.04 LTS:

java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)

This is my testing code using Python library:
-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----

import riak
client = riak.RiakClient(protocol='pbc',
nodes=[{'host':'127.0.0.1','http_port':8098,'pb_port':8087}])
bucket = client.bucket('accounts')
bucket.enable_search()
key = bucket.new('alex', data={"username":"Alex","age":25,"sex":"male"},
content_type='application/json')
key.store()
print bucket.search('sex=male')

# Code following example in:
http://basho.github.io/riak-python-client/query.html#fulltext-search

-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----
This is the error that Riak Search is giving to me:
-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----

Traceback (most recent call last):
  File "test.py", line 7, in <module>
    bucket.search('sex=male')
  File
"/usr/local/lib/python2.7/dist-packages/riak-2.0.3-py2.7.egg/riak/bucket.py",
line 446, in search
  File
"/usr/local/lib/python2.7/dist-packages/riak-2.0.3-py2.7.egg/riak/client/transport.py",
line 127, in wrapper
  File
"/usr/local/lib/python2.7/dist-packages/riak-2.0.3-py2.7.egg/riak/client/transport.py",
line 69, in _with_retries
  File
"/usr/local/lib/python2.7/dist-packages/riak-2.0.3-py2.7.egg/riak/client/transport.py",
line 125, in thunk
  File
"/usr/local/lib/python2.7/dist-packages/riak-2.0.3-py2.7.egg/riak/client/operations.py",
line 428, in fulltext_search
  File
"/usr/local/lib/python2.7/dist-packages/riak-2.0.3-py2.7.egg/riak/transports/pbc/transport.py",
line 453, in search
  File
"/usr/local/lib/python2.7/dist-packages/riak-2.0.3-py2.7.egg/riak/transports/pbc/connection.py",
line 43, in _request
  File
"/usr/local/lib/python2.7/dist-packages/riak-2.0.3-py2.7.egg/riak/transports/pbc/connection.py",
line 55, in _recv_msg
riak.RiakError: 'No index <<"accounts">> found.'
-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----

Cheers,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20140701/6ae00431/attachment.html>


More information about the riak-users mailing list