ripple find_by_index

Christopher Chow chris at chowie.net
Wed Oct 24 17:52:19 EDT 2012


Thanks,

That worked, though not performing as fast as I'd like.

Chris

On 24 October 2012 23:37, Dmitri Zagidulin <dzagidulin at basho.com> wrote:

> I think the syntax should be:
>
> property :type, String, index: true
>
> (instead of index: type)
>
> On Wed, Oct 24, 2012 at 4:01 AM, Christopher Chow <chris at chowie.net>wrote:
>
>> 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
>>
>> _______________________________________________
>> 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/20121025/c6a275aa/attachment.html>


More information about the riak-users mailing list