Riak search question (Python)

Mike Stoddart stodge at gmail.com
Fri Feb 18 19:44:03 EST 2011


I'm experimenting with Riak Search; I'm storing tweets and then trying
to query them. My code to store a tweet is:

                       tweet = bucket.new(str(uuid.uuid1()), data={
                               'name': s.user.name,
                               'text': s.text,
                       })
                       tweet.store()

My code to search the tweets is:

    search_query = client.search('tweets', 'name:[andy TO john]')

I've tried many different queries including:

    search_query = client.search('tweets', 'text:and')

But I never get any hits. Am I doing something fundamentally wrong? I
print out the tweet as I add it to the database so I know what terms I
can search on. But nothing works. I did remember to do:

serach-cmd install tweets

Any suggestions appreciated.

Thanks
Mike




More information about the riak-users mailing list