Martin,

Also keep in mind that if you're using the Ripple::TestServer in your
tests, it uses the memory backend, which also supports 2I.


On Wed, Dec 5, 2012 at 9:19 AM, Martin Streicher <[email protected]
> wrote:

>
> I will look.
>
>
>
> On Dec 5, 2012, at 10:04 AM, Gideon de Kok wrote:
>
> I'm not using Ripple, but am assuming that line of code fetches the object
> by index.
> As I stated before; since you are using Bitcask, you can't use any
> secondary indexes.
>
> Information about 2i can be found at:
> http://docs.basho.com/riak/latest/tutorials/querying/Secondary-Indexes/
> I suggest to read those pages and the ones about choosing backends to get
> a better view how Riak actually works and how to configure it properly.
>
> Cheers,
>
> On Dec 5, 2012, at 4:00 PM, Martin Streicher <[email protected]>
> wrote:
>
> Gideon: Thanks.
>
> A few more details.
>
> I am using Ripple. These are the critical lines, where the latter is a
> class method.
>
> property :zid_id,           String, index: true
>
>   def self.find_by_zid(zid)
>     key = zid.respond_to?(:key) ? zid.key : zid
>     find_by_index('zid_id', key).first
>   end
>
> I have this in my app.config
> {storage_backend, riak_kv_bitcask_backend},
>
> My rspec tests pass.
>
> Any other clues?
>
> On Dec 5, 2012, at 9:53 AM, Gideon de Kok wrote:
>
> Probably because you've already configured leveldb as backend.
> There is a tutorial:
> http://docs.basho.com/riak/1.2.0/tutorials/choosing-a-backend/LevelDB/ on
> how to switch backends…
>
> Cheers,
>
>
> On Dec 5, 2012, at 3:51 PM, Martin Streicher <[email protected]>
> wrote:
>
>
> Hmmm... then why does the code work on my machine?
>
> And how do I switch backends?
>
>
> On Dec 5, 2012, at 9:47 AM, Gideon de Kok wrote:
>
> Martin,
>
> Your log nicely states what the problem is:
> {indexes_not_supported,riak_kv_bitcask_backend}
>
> For 2i based queries, you should be using the eleveldb backend…
>
> Cheers,
>
> On Dec 5, 2012, at 3:43 PM, Martin Streicher <[email protected]>
> wrote:
>
>
> A colleague is getting the following error...
>
> Riak::HTTPFailedRequest (Expected 200 from Riak but received 500.
> <html><head><title>500 Internal Server
> Error</title></head><body><h1>Internal Server Error</h1>The server
> encountered an error while processing this
> request:<br><pre>{error,{error,{indexes_not_supported,riak_kv_bitcask_backend}}}</pre><P><HR><ADDRESS>mochiweb+webmachine
> web server</ADDRESS></body></html>):
> app/controllers/profiles_controller.rb:28:in `find_identity'
>
> We've run search-cmd install on the bucket. The code for the app
> essentially does the search-cmd operation at startup, too.
>
> There is one field in the model where index: true. This parameter was
> added recently so I can run find_by_index to lookup records by the field
> values, but my machine did not have any issues.
>
> Any ideas?
>
> Martin
>
>
>
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
>
>
>
>
>
>
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>


-- 
Sean Cribbs <[email protected]>
Software Engineer
Basho Technologies, Inc.
http://basho.com/
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to