Strange results from numerical range query in Riak Search

Mathias Meyer mathias at
Tue Apr 5 04:58:50 EDT 2011


you need to make sure the followers field is marked as a numeric field in the bucket's schema in Riak Search. You can do that by either relying on the default schema and appending _num to the field name, so it'd be followers_num instead of followers in the JSON you're generating.

Or you could set your own custom schema for the bucket, telling Riak Search to treat the followers field as a numeric field. Both is detailed on our wiki:

Mathias Meyer
Developer Advocate, Basho Technologies

On Dienstag, 5. April 2011 at 03:14, Mike Stoddart wrote: 
> I'm installing the lakes/celtics twitter data linked through Basho's
> site. I can get some basic text searches to work, but I'm seeing some
> weird results from numerical range queries:
> search_query ='stuff', 'followers:[140 TO 150]')
> Name:Kevin Shpunt Term:lakers Followers:146
> Name:Carlos Ordonez Term:lakers Followers:15
> Name:Kelvin Shortt Jr Term:lakers,celtics Followers:140
> Name:Stanley T. Davis Term:lakers Followers:15
> Name:John Robertson Term:lakers Followers:141
> Name:Steven Wineglass Term:lakers Followers:1493
> Name:Badral Jambal Term:lakers Followers:1432
> Am I doing something wrong?
> Thanks
> Mike
> _______________________________________________
> riak-users mailing list
> riak-users at

More information about the riak-users mailing list