ripple find_by_index

Christopher Chow chris at chowie.net
Wed Oct 24 04:01:06 EDT 2012


Hi everyone,

I'm after some newbie help with ripple. I've created secondary indexes on a
property in my document class and have confirmed that I can query the index
via the browser. I've also confirmed the indexes are there as
Ripple.client.get_index("test_riak_data",
"type_bin", "foo") works and returns the keys of the documents.

My document class is extremely simple:

module Test::Riak
  class Data
    include Ripple::Document

    property :type, String
    index :type, String
  end
end

However, when I try Test::Riak::Data.find_by_index(:type, "foo") I get
an ArgumentError:
No index has been defined for property 'type' of type 'Test::Riak::Data'.

I'm probably doing something wrong but I'm not sure what. Any help would be
appreciated.

Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20121024/fb589bff/attachment.html>


More information about the riak-users mailing list