Why does Riak Search find one thing and then tell me there were two?

Rob Speer rob at luminoso.com
Thu Apr 11 15:30:49 EDT 2013


Today, all my Riak-related tests have been failing. I tracked down the
reason why: many calls to riak.solr.search() are returning a 'num_found'
that is greater than the actual number of documents they find.

Here's an example:

>>> riak.solr.search('test_riak-search', 'terms:plasma\|en', count=10)
{'max_score': 0.353553, 'num_found': 2, 'docs': [{'segments': '1 17 172
1725', 'terms': 'sun|en miasma|en of|en incandescent|en plasma|en', u'id':
'uuid-1725ca7400ba483e96fec68f92637198', 'subsets': '__all__'}]}

I have also seen a case, after I delete my test data, where I search and
get _zero_ results with a num_found of 2:

>>> riak.solr.search('test_riak-search', 'terms:plasma\|en', count=10)
{'max_score': 0.353553, 'num_found': 2, 'docs': []}

How is this happening? Is 'num_found' supposed to be an accurate count?

-- Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20130411/d67557e5/attachment.html>


More information about the riak-users mailing list