Solr interface from python

Ryan Zezeski rzezeski at basho.com
Thu Dec 22 17:11:46 EST 2011


Shuhao,

Did you enable search on the 'test' bucket?  I'm not sure what the Python
API is to do that but I don't see it in your code excerpt.

-Ryan

On Sun, Dec 18, 2011 at 1:39 PM, Shuhao Wu <admin at thekks.net> wrote:

> I'm having a bit of trouble working with the solr interface:
>
> >>> import riak
> >>> client = riak.RiakClient()
> >>> bucket = client.bucket("test")
> >>> bucket.new("key", data={"hello" : "world"}).store()
> <riak.riak_object.RiakObject object at 0x2462e50>
> >>> bucket.get("key").exists()
> True
> >>> client.solr().search("test", "hello:'world'")
> {u'responseHeader': {u'status': 0, u'QTime': 1, u'params': {u'q':
> u"hello:'world'", u'filter': u'', u'wt': u'json', u'q.op': u'or'}},
> u'response': {u'start': 0, u'maxScore': u'0.0', u'numFound': 0,
> u'docs': []}}
> >>>
>
> As you can see, there's no docs found.
>
> The documentation doesn't seem that helpful, either.
>
> Am I doing this wrong?...
>
> Thanks,
>
> Shuhao
>
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20111222/21a56fd4/attachment.html>


More information about the riak-users mailing list