Riak Search Issue

Alex De la rosa alex.rosa.box at gmail.com
Mon Aug 18 17:38:51 EDT 2014


Hi Eric,

Cool! This new syntax really worked :) even on different bucket names :) It
has been driving me crazy all day... haha, glad is finally sorted out.

PYTHON:
results = client.fulltext_search('famoso', 'name_s:Lio*')
print results

OUTPUT:
{'num_found': 2, 'max_score': 1.0, 'docs': [{u'age_i': u'30', u'name_s':
u'Lionel', u'_yz_rk': u'lionel', u'_yz_rb': u'fcb', u'score':
u'1.00000000000000000000e+00', u'leader_b': u'true', u'_yz_id':
u'1*futbolistas*fcb*lionel*59', u'_yz_rt': u'futbolistas'}, {u'age_i':
u'30', u'name_s': u'Lionel', u'_yz_rk': u'lionel', u'_yz_rb': u'famoso',
u'score': u'1.00000000000000000000e+00', u'leader_b': u'true', u'_yz_id':
u'1*futbolistas*famoso*lionel*8', u'_yz_rt': u'futbolistas'}]}

Thanks!
Alex


On Mon, Aug 18, 2014 at 11:33 PM, Eric Redmond <eredmond at basho.com> wrote:

> Alex,
>
> I was mistaken about the bucket search. The documentation is wrong, and
> the API is weirded for backward compatibility reasons. You should be able
> to search by index name this way.
>
> client.fulltext_search(index, query, **params)
>
> We'll update the docs to match.
>
> Eric
>
>
> On Aug 18, 2014, at 2:29 PM, Alex De la rosa <alex.rosa.box at gmail.com>
> wrote:
>
> Hi Sean,
>
> Yeah, I opted to follow that pattern on my latest attempt as I see it more
> clear that the way in the documentation. Still same issue although with
> Eric we saw it works fine when index and bucket has the same name.
>
> Thanks!
> Alex
>
>
> On Mon, Aug 18, 2014 at 11:27 PM, Sean Cribbs <sean at basho.com> wrote:
>
>> Don't use bucket with 2 arguments, use
>> client.bucket_type('futbolistas').bucket('fcb'). This makes your
>> intent more clear. The 2-arity version of bucket() was for
>> backwards-compatibility.
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20140818/a7fa3070/attachment.html>


More information about the riak-users mailing list