I’m trying Indextank for search.
In the model:
class Post < ActiveRecord::Base
tankit 'rails_3_demo' do
indexes :title
indexes :content
end
Problem with this is that dev/test/staging/prod environments are all using the same index. What’s the right way to make sure the environments are using the right env index?
Thanks,
I’m going to assume that by “using the same index” you mean using the same IndexTank API endpoint.
I think what you need to do is set up different endpoints at IndexPoint for each environment and then setup an initializer in your rails stack to point to the appropriate environment’s tank. Looks like you get 100k documents free at IndexTank so you shouldn’t run into any pay barriers for this setup: